| | |
| | | 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" |
| | | } |
| | | //清单只能合并一个,所有插件的清单需要手动复制到对应的渠道里 |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | 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 |
| | |
| | | } |
| | | 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 |
| | |
| | | // 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') |
| | | } |