From 471d95a66fd642b75f788e8b50730e9d95ef8e2e Mon Sep 17 00:00:00 2001
From: allez <305670599@qq.com>
Date: 星期四, 12 八月 2021 16:38:19 +0800
Subject: [PATCH] 0000 支持最新的港台SDK

---
 SdkProject/library/build.gradle |   28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/SdkProject/library/build.gradle b/SdkProject/library/build.gradle
index 09ab1a6..0fc6fa5 100644
--- a/SdkProject/library/build.gradle
+++ b/SdkProject/library/build.gradle
@@ -98,11 +98,7 @@
                 java.srcDirs "${pluginPath}/java"
                 jniLibs.srcDirs "${pluginPath}libs"
                 res.srcDirs "${pluginPath}/res"
-                manifest {
-                    File file = file("${pluginPath}/AndroidManifest.xml")
-                    if (file.exists())
-                        srcFile "${pluginPath}/AndroidManifest.xml"
-                }
+                //娓呭崟鍙兘鍚堝苟涓�涓紝鎵�鏈夋彃浠剁殑娓呭崟闇�瑕佹墜鍔ㄥ鍒跺埌瀵瑰簲鐨勬笭閬撻噷
             }
         }
     }
@@ -142,12 +138,13 @@
 }
 
 task deleteSdk() {
-    delete "${outPutPath}\\${CHANNEL_NAME}"
+    delete "${outPutPath}\\${CHANNEL_NAME}\\debug"
+    delete "${outPutPath}\\${CHANNEL_NAME}\\release"
 }
 
 //鎵ц鎵撳寘浠诲姟浠ュ強鎷疯礉鍒板閮�
 task assembleAndCopySdk() {
-    dependsOn 'assembleMerger'
+    dependsOn 'assemble'
     dependsOn deleteSdk
     dependsOn copyDebugSdk
     dependsOn copyReleaseSdk
@@ -165,14 +162,18 @@
     }
     plugins.each {
         deps = file("${rootPath}/plugins/${it}/deps.gradle")
-        deps.eachLine { line ->
-            if (line != null)
-                content += line + "\n"
+        if(deps.exists()){
+            deps.eachLine { line ->
+                if (line != null)
+                    content += line + "\n"
+            }
         }
     }
     def dir = new File("${outPutPath}\\${CHANNEL_NAME}")
     def libraries = new File("${outPutPath}\\${CHANNEL_NAME}\\deps.gradle")
     dir.mkdir()
+    if (libraries.exists())
+        libraries.delete()
     if (!libraries.exists())
         libraries.createNewFile()
     libraries.text = content
@@ -180,14 +181,17 @@
 
 dependencies {
     implementation 'com.android.support:support-annotations:28.0.0'
-    testImplementation 'junit:junit:4.13.1'
+    testImplementation 'junit:junit:4.13.2'
 
     //noinspection GradleCompatible
-    implementation 'com.android.support:appcompat-v7:28.0.0'
+//    implementation 'com.android.support:appcompat-v7:28.0.0'
 
 //    implementation 'com.github.pqpo:Log4a:1.4.2@aar'
 
     implementation fileTree(dir: "../channel/${CHANNEL_NAME}/libs/", include: ['*.jar'])
+    plugins.each {
+        implementation fileTree(dir: "${rootPath}/plugins/${it}/libs/", include: ['*.jar'])
+    }
     implementation fileTree(dir: 'libs', include: ['*.jar'], exclude: ['unity-classes.jar'])
     compileOnly files('libs/unity-classes.jar')
 }
\ No newline at end of file

--
Gitblit v1.8.0