Build: fix some warnings in buildSrc and build.gradle.kts

This commit is contained in:
Alexander Udalov
2023-06-23 16:22:38 +02:00
committed by Space Team
parent 89507c1b82
commit c66bc36382
14 changed files with 31 additions and 23 deletions
@@ -14,6 +14,7 @@ import org.gradle.util.GradleVersion
// This script is also being used in the Gradle integration tests which runs older Gradle versions
fun <T : Any> Provider<T>.forUseAtConfigurationTimeCompat(): Provider<T> =
if (GradleVersion.current() < GradleVersion.version("7.4")) {
@Suppress("DEPRECATION")
forUseAtConfigurationTime()
} else {
this
@@ -69,7 +69,7 @@ fun getRootSettings(
}
else -> {
val gradleParent = gradle.parent ?: error("Could not get includedBuild parent build for ${settings.rootDir}!")
getRootSettings(gradle.parent!!.settings, gradle.parent!!)
getRootSettings(gradleParent.settings, gradleParent)
}
}
}
@@ -138,7 +138,7 @@ fun String?.propValueToBoolean(default: Boolean = false): Boolean {
}
}
fun Provider<String>.mapToBoolean(): Provider<Boolean> = map { it?.propValueToBoolean() }
fun Provider<String>.mapToBoolean(): Provider<Boolean> = map { it.propValueToBoolean() }
fun RepositoryHandler.addBootstrapRepo(
bootstrapRepo: String,