def mainProjects = [':sdk_ad_casual', ':sdk_ad_base', ':sdk_ad_framework', ':sdk_ad_google', ':sdk_ad_self']
task delAssets(){ delete('build/assets') delete('build/libs') }
task createAssets(type: Jar, dependsOn: delAssets){ baseName 'build/assets/assets'
project(':sdk_ad_base').fileTree('src/main/java/assets').each{ from it.getPath() into 'assets' }
from ".." // I assume that you add another path here not ".." }
task oneJar( type: Jar , dependsOn: mainProjects.collect{ it+":build"}) { baseName = 'build/libs/sdk_ad' from files(mainProjects.collect{ zipTree(project(it).file("build/intermediates/bundles/release/classes.jar")) }) from zipTree('build/assets/assets.jar') exclude 'assets/META-INF/**' }
oneJar {}.dependsOn createAssets
|