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) // Workaround: ältere Plugins (z. B. on_audio_query_android) deklarieren // keinen namespace, den AGP 8+ verlangt. Aus der group ableiten. // Muss vor evaluationDependsOn registriert werden (sonst schon evaluiert). afterEvaluate { val androidExt = extensions.findByName("android") as? com.android.build.gradle.BaseExtension if (androidExt != null && androidExt.namespace == null) { androidExt.namespace = project.group.toString() } // on_audio_query_android kompiliert gegen SDK 33, seine AndroidX- // Abhängigkeiten (fragment, window, ...) verlangen aber mindestens 34. // Zu niedrige Library-Module auf 36 anheben (echtes SDK, nicht die 37-Kopie). val libCompileSdk = androidExt?.compileSdkVersion?.removePrefix("android-")?.toIntOrNull() if (libCompileSdk != null && libCompileSdk < 34) { androidExt.compileSdkVersion(36) } } } subprojects { project.evaluationDependsOn(":app") } tasks.register("clean") { delete(rootProject.layout.buildDirectory) }