2026-10-11 09:33:25 +03:00
|
|
|
allprojects {
|
|
|
|
|
repositories {
|
|
|
|
|
google()
|
|
|
|
|
mavenCentral()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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 {
|
|
|
|
|
project.evaluationDependsOn(":app")
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-12 08:17:49 +03:00
|
|
|
// The devbox-managed SDK ships one NDK and is read-only, so Gradle can never
|
|
|
|
|
// install another beside it. Plugin build scripts ask for Flutter's default
|
|
|
|
|
// NDK, which the SDK does not carry; every project is therefore pinned to
|
|
|
|
|
// the one it does. Matches the app's own pin in app/build.gradle.kts.
|
|
|
|
|
gradle.afterProject {
|
|
|
|
|
// The devbox-managed SDK ships one NDK and is read-only, so Gradle can
|
|
|
|
|
// never install another beside it. Plugin build scripts ask for
|
|
|
|
|
// Flutter's default NDK, which the SDK does not carry; every project
|
|
|
|
|
// is therefore pinned to the one it does, as the app itself is.
|
|
|
|
|
val android = extensions.findByName("android") ?: return@afterProject
|
|
|
|
|
try {
|
|
|
|
|
android::class.java
|
|
|
|
|
.getMethod("setNdkVersion", String::class.java)
|
|
|
|
|
.invoke(android, "27.0.12077973")
|
|
|
|
|
} catch (_: NoSuchMethodException) {
|
|
|
|
|
// Nothing to pin.
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-11 09:33:25 +03:00
|
|
|
tasks.register<Delete>("clean") {
|
|
|
|
|
delete(rootProject.layout.buildDirectory)
|
|
|
|
|
}
|