Files
etchdroid/settings.gradle.kts
Davide Depau c3478e86c3 fix(build): decide GPlay plugins before the plugins blocks run
Gradle runs a build script's plugins {} block before the rest of the
script, so the flavor property set in app/build.gradle.kts was only seen
by the next build in the same daemon. A fresh daemon skipped the Sentry
plugin and then failed configuring the missing 'sentry' extension; a
FOSS build after a GPlay one got the Google plugins. Set it in
settings.gradle.kts, which is evaluated before any project script.
2026-11-04 19:06:22 +01:00

28 lines
815 B
Kotlin

@file:Suppress("UnstableApiUsage")
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
maven(url = "https://jitpack.io")
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven(url = "https://jitpack.io")
}
}
// Read by the build scripts' plugins {} blocks, which Gradle runs before any other code in those
// scripts, so it must be set here. Setting it on every run also overwrites the daemon's stale value.
val isGPlayFlavor = gradle.startParameter.taskNames.any { it.lowercase().contains("gplay") }
System.setProperty("etchdroid.isGPlayFlavor", isGPlayFlavor.toString())
rootProject.name = "EtchDroid"
include(":app")