Skip to content

Commit

Permalink
Fix CLI property ignored in version resolution (#3663)
Browse files Browse the repository at this point in the history
Co-authored-by: Vsevolod Tolstopyatov <[email protected]>
  • Loading branch information
Badya and qwwdfsad authored Jun 1, 2023
1 parent 0238247 commit 84080aa
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ repositories {
}
}

kotlinDslPluginOptions {
experimentalWarning.set(false)
}

val props = Properties().apply {
val gradleProperties = Properties().apply {
file("../gradle.properties").inputStream().use { load(it) }
}

Expand All @@ -41,7 +37,9 @@ fun version(target: String): String {
val snapshotVersion = properties["kotlin_snapshot_version"]
if (snapshotVersion != null) return snapshotVersion.toString()
}
return props.getProperty("${target}_version")
val version = "${target}_version"
// Read from CLI first, used in aggregate builds
return properties[version]?.let{"$it"} ?: gradleProperties.getProperty(version)
}

dependencies {
Expand Down

0 comments on commit 84080aa

Please sign in to comment.