update: 更新 Network Security 配置
							parent
							
								
									c1f4903a0e
								
							
						
					
					
						commit
						cde02eaf1a
					
				|  | @ -1,6 +1,6 @@ | ||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | <manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||||||
|           package="com.guru.unity.sdk.res" |           package="com.guru.unity.sdk.android.res.network-security" | ||||||
|           android:versionCode="1" |           android:versionCode="1" | ||||||
|           android:versionName="1.0"> |           android:versionName="1.0"> | ||||||
| </manifest> | </manifest> | ||||||
|  | @ -6,8 +6,9 @@ namespace Guru.Editor | ||||||
|      |      | ||||||
|     public class AndroidResMod |     public class AndroidResMod | ||||||
|     { |     { | ||||||
|         private static readonly string ResName = "GuruSDKRes"; |         private static readonly string ResName = "GuruNetworkSecurity"; | ||||||
|         private static string ResFullPath = Path.Combine(Application.dataPath, $"Plugins/Android/{ResName}.androidlib"); |         private static string ResFullPath = Path.Combine(Application.dataPath, $"Plugins/Android/{ResName}.androidlib"); | ||||||
|  |         private static string OldSecurityXml = Path.Combine(Application.dataPath, "Plugins/Android/res/xml/network_security_config.xml"); | ||||||
|          |          | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         /// 应用补丁 |         /// 应用补丁 | ||||||
|  | @ -20,6 +21,8 @@ namespace Guru.Editor | ||||||
| 
 | 
 | ||||||
|         private static void DeployAndroidRes() |         private static void DeployAndroidRes() | ||||||
|         { |         { | ||||||
|  |             if(File.Exists(OldSecurityXml)) File.Delete(OldSecurityXml); | ||||||
|  |              | ||||||
|             var spath = GuruEditorHelper.GetFilePath($"{nameof(AndroidResMod)} t:Script"); |             var spath = GuruEditorHelper.GetFilePath($"{nameof(AndroidResMod)} t:Script"); | ||||||
|             if (!string.IsNullOrEmpty(spath)) |             if (!string.IsNullOrEmpty(spath)) | ||||||
|             { |             { | ||||||
|  | @ -31,7 +34,6 @@ namespace Guru.Editor | ||||||
|                     { |                     { | ||||||
|                         FileUtil.DeleteFileOrDirectory(ResFullPath); |                         FileUtil.DeleteFileOrDirectory(ResFullPath); | ||||||
|                     } |                     } | ||||||
| 
 |  | ||||||
|                     FileUtil.CopyFileOrDirectory(from, to); |                     FileUtil.CopyFileOrDirectory(from, to); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |  | ||||||
|  | @ -850,7 +850,7 @@ namespace Guru.Editor | ||||||
|             //-------- 部署 Android 相关的文件和资源 ---------- |             //-------- 部署 Android 相关的文件和资源 ---------- | ||||||
|             AndroidManifestMod.Apply(); |             AndroidManifestMod.Apply(); | ||||||
|             AndroidProjectMod.Apply(); |             AndroidProjectMod.Apply(); | ||||||
|             // AndroidResMod.Apply(); // 部署 GuruSDKRes 资源文件, 目前部署在 guru.sdk.core 的 Plugins/Android/SDKRes.androidlib 中 |             AndroidResMod.Apply(); // 部署 GuruSDKRes 资源文件, 目前部署在 guru.sdk.core 的 Plugins/Android/SDKRes.androidlib 中 | ||||||
| // #endif | // #endif | ||||||
| 
 | 
 | ||||||
|             AssetDatabase.Refresh(); |             AssetDatabase.Refresh(); | ||||||
|  |  | ||||||
|  | @ -8,7 +8,7 @@ namespace Guru | ||||||
|      |      | ||||||
|     public partial class GuruSDK: MonoBehaviour |     public partial class GuruSDK: MonoBehaviour | ||||||
|     { |     { | ||||||
|         public const string Version = "1.0.5"; |         public const string Version = "1.0.6"; | ||||||
|         public const string Tag = "[Guru]"; |         public const string Tag = "[Guru]"; | ||||||
|         public const string ServicesConfigKey = "guru_services"; |         public const string ServicesConfigKey = "guru_services"; | ||||||
|          |          | ||||||
|  |  | ||||||
|  | @ -1,7 +1,7 @@ | ||||||
| { | { | ||||||
|   "name": "com.guru.unity.sdk", |   "name": "com.guru.unity.sdk", | ||||||
|   "displayName": "Guru SDK", |   "displayName": "Guru SDK", | ||||||
|   "version": "1.0.5", |   "version": "1.0.6", | ||||||
|   "description": "Guru SDK for unity project", |   "description": "Guru SDK for unity project", | ||||||
|   "unity": "2020.3", |   "unity": "2020.3", | ||||||
|   "author":{ |   "author":{ | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue