Skip to content

Commit

Permalink
workie ??
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxikle committed Jun 13, 2024
1 parent a789824 commit 65bc368
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,19 @@ publishing {
authentication {
create<BasicAuthentication>("basic") {
// Use providers to get the properties or fallback to environment variables
println(System.getenv("REPO_PASSWORD").length)
println("pass: " + System.getenv("REPO_PASSWORD") + " | user: " + System.getenv("REPO_USERNAME"))
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.get().length)
println("pass: " + pass.get() + " | user: " + user.get())
println("pass: " + pass.isPresent + " | user: " + user.isPresent)



if (user.get().isEmpty() || !user.isPresent) {
user.orElse("no-value-provided")
}

println("pass: " + pass.isPresent + " | user: " + user.isPresent)
credentials {
username = user.getOrElse("no-value-provided")
password = pass.getOrElse("no-value-provided")
Expand Down

0 comments on commit 65bc368

Please sign in to comment.