Skip to content

Commit e1fef03

Browse files
committed
chore: fix -PlocalCdp and -Pnoverify so locally-built checksum-dependency-plugin jar can be applied
1 parent a042be6 commit e1fef03

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

settings.gradle.kts

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ buildscript {
5454
fun String.v(): String = extra["$this.version"] as String
5555

5656
dependencies {
57-
if (extra.has("noverify")) {
57+
if (property("noverify")?.ifEmpty { "false" } ?.toBoolean() == true) {
5858
// skip
59-
} else if (extra.has("localCdp")) {
59+
} else if (property("localCdp")?.ifEmpty { "true" }?.toBoolean() == true) {
6060
// Below enables use of locally built file for testing purposes
6161
classpath(files("plugins/checksum-dependency-plugin/build/libs/checksum-dependency-plugin-${"project".v()}.jar"))
6262
classpath("org.bouncycastle:bcpg-jdk15on:1.62")
@@ -122,10 +122,10 @@ val violations =
122122
.joinToString("\n ") { (file, sha512) -> "SHA-512(${file.name}) = $sha512 ($file)" }
123123

124124
// This enables to skip checksum-dependency which is helpful for checksum-dependency development
125-
if (!extra.has("noverify")) {
125+
if (property("noverify")?.ifEmpty { "false" } ?.toBoolean() != true) {
126126
if (violations.isNotBlank()) {
127127
val msg = "Buildscript classpath has non-whitelisted files:\n $violations"
128-
if (extra.has("localCdp")) {
128+
if (property("localCdp")?.ifEmpty { "true" }?.toBoolean() == true) {
129129
println(msg)
130130
} else {
131131
throw GradleException(msg)

0 commit comments

Comments
 (0)