From 95e4563144963cad33a024a86b156ffe6aa3f40a Mon Sep 17 00:00:00 2001 From: Ben Liblit Date: Mon, 15 Jan 2024 12:32:21 -0500 Subject: [PATCH] Simplify access to single properties If we only need to fetch a single property, then we don't need to build an entire mutable `Map` that represents all properties. --- .../src/main/kotlin/com/ibm/wala/gradle/publishing.gradle.kts | 4 ++-- build.gradle.kts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build-logic/src/main/kotlin/com/ibm/wala/gradle/publishing.gradle.kts b/build-logic/src/main/kotlin/com/ibm/wala/gradle/publishing.gradle.kts index 4e1abfc200..c628bb9ead 100644 --- a/build-logic/src/main/kotlin/com/ibm/wala/gradle/publishing.gradle.kts +++ b/build-logic/src/main/kotlin/com/ibm/wala/gradle/publishing.gradle.kts @@ -135,8 +135,8 @@ val mavenRepository: MavenArtifactRepository = "https://oss.sonatype.org/service/local/staging/deploy/maven2/")) as String) credentials { - username = properties["SONATYPE_NEXUS_USERNAME"] as String? - password = properties["SONATYPE_NEXUS_PASSWORD"] as String? + username = findProperty("SONATYPE_NEXUS_USERNAME") as String? + password = findProperty("SONATYPE_NEXUS_PASSWORD") as String? } } diff --git a/build.gradle.kts b/build.gradle.kts index e7dad31771..2d03695e5f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -45,7 +45,7 @@ JavaVersion.current().let { group = name -version = properties["VERSION_NAME"] as String +version = property("VERSION_NAME") as String // version of Eclipse JARs to use for Eclipse-integrated WALA components. val eclipseVersion: EclipseRelease by extra {