mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-04 15:49:49 +00:00
37 lines
1001 B
Groovy
37 lines
1001 B
Groovy
allprojects {
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
}
|
|
|
|
rootProject.buildDir = '../build'
|
|
subprojects {
|
|
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
|
}
|
|
subprojects {
|
|
project.evaluationDependsOn(':app')
|
|
}
|
|
|
|
subprojects { subproject ->
|
|
subproject.plugins.withId('com.android.library') {
|
|
subproject.android {
|
|
if (namespace == null || namespace.isEmpty()) {
|
|
def manifest = file("${subproject.projectDir}/src/main/AndroidManifest.xml")
|
|
if (manifest.exists()) {
|
|
def manifestContent = manifest.getText()
|
|
def packagePattern = /package\s*=\s*["']([^"']+)["']/
|
|
def matcher = (manifestContent =~ packagePattern)
|
|
if (matcher.find()) {
|
|
namespace = matcher.group(1)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.register('clean', Delete) {
|
|
delete rootProject.buildDir
|
|
}
|