buildscript { dependencyLocking { // This property is treated specially, as it is not defined by default in the root gradle.properties // and declaring it in the root gradle.properties is ignored by included builds. This only picks up // a value declared as a system property, a command line argument, or an environment variable. val isDependencyLockingEnabled = if (project.hasProperty("ZCASH_IS_DEPENDENCY_LOCKING_ENABLED")) { project.property("ZCASH_IS_DEPENDENCY_LOCKING_ENABLED").toString().toBoolean() } else { true } if (isDependencyLockingEnabled) { lockAllConfigurations() } } } dependencyLocking { // This property is treated specially, as it is not defined by default in the root gradle.properties // and declaring it in the root gradle.properties is ignored by included builds. This only picks up // a value declared as a system property, a command line argument, or an environment variable. val isDependencyLockingEnabled = if (project.hasProperty("ZCASH_IS_DEPENDENCY_LOCKING_ENABLED")) { project.property("ZCASH_IS_DEPENDENCY_LOCKING_ENABLED").toString().toBoolean() } else { true } if (isDependencyLockingEnabled) { lockAllConfigurations() } } plugins { id("bip39.detekt-conventions") id("bip39.ktlint-conventions") alias(libs.plugins.versions) } tasks { withType { gradleReleaseChannel = "current" resolutionStrategy { componentSelection { all { if (isNonStable(candidate.version) && !isNonStable(currentVersion)) { reject("Unstable") } } } } } } val unstableKeywords = listOf("alpha", "beta", "rc", "m", "ea", "build") fun isNonStable(version: String): Boolean { val versionLowerCase = version.lowercase() return unstableKeywords.any { versionLowerCase.contains(it) } }