From ce8f04a94b215fe66d5365d6501356a52c2ace22 Mon Sep 17 00:00:00 2001 From: foxikle Date: Thu, 13 Jun 2024 15:25:06 -0400 Subject: [PATCH] workie ??? --- build.gradle.kts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index bac64999..a5212146 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -85,17 +85,18 @@ publishing { authentication { create("basic") { // Use providers to get the properties or fallback to environment variables - val user = - providers.gradleProperty("username").orElse(System.getenv("REPO_USERNAME")).orElse("null") - val pass = - providers.gradleProperty("password").orElse(System.getenv("REPO_PASSWORD")).orElse("null") - println("pass: " + pass.isPresent + " | user: " + user.isPresent) - - + var u = System.getenv("REPO_USERNAME") + var p = System.getenv("REPO_PASSWORD") - if (user.get().isEmpty() || !user.isPresent) { - user.orElse("no-value-provided") + if (u.isEmpty()) { + u = "no-value-provided" } + if (p.isEmpty()) { + p = "no-value-provided" + } + + val user = providers.gradleProperty("username").orElse(u) + val pass = providers.gradleProperty("password").orElse(p) println("pass: " + pass.isPresent + " | user: " + user.isPresent) credentials {