37 lines
986 B
Plaintext
37 lines
986 B
Plaintext
allprojects {
|
|
repositories {
|
|
maven { url = uri("https://archive.ito.gov.ir/gradle/maven_central") }
|
|
}
|
|
}
|
|
|
|
val newBuildDir: Directory =
|
|
rootProject.layout.buildDirectory
|
|
.dir("../../build")
|
|
.get()
|
|
rootProject.layout.buildDirectory.value(newBuildDir)
|
|
|
|
subprojects {
|
|
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
|
|
project.layout.buildDirectory.value(newSubprojectBuildDir)
|
|
}
|
|
subprojects {
|
|
val setupNamespace = Action<Project> {
|
|
if (hasProperty("android")) {
|
|
val android = property("android") as? com.android.build.gradle.BaseExtension
|
|
if (android?.namespace == null) {
|
|
android?.namespace = "com.github.twyatt.${name.replace("-", ".")}"
|
|
}
|
|
}
|
|
}
|
|
|
|
if (state.executed) {
|
|
setupNamespace.execute(this)
|
|
} else {
|
|
afterEvaluate(setupNamespace)
|
|
}
|
|
}
|
|
|
|
tasks.register<Delete>("clean") {
|
|
delete(rootProject.layout.buildDirectory)
|
|
}
|