Skip to content

Commit

Permalink
Updated build.gradle.kts
Browse files Browse the repository at this point in the history
  • Loading branch information
vsnappy1 committed Oct 31, 2024
1 parent b5e1944 commit 98790a0
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions resourcemanager/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -294,31 +294,4 @@ publishing {
}
}
}
repositories {
maven {
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")

// Load passphrase from local.properties or environment variable
val properties = Properties()
val localPropertiesFile = project.rootProject.file("local.properties")

// Check if local.properties exists
if (localPropertiesFile.exists()) {
properties.load(localPropertiesFile.inputStream())
}

val username = properties.getProperty("SONATYPE_USERNAME_TOKEN") ?: System.getenv("SONATYPE_USERNAME_TOKEN")
?: throw GradleException("GPG_PASSPHRASE not found in local.properties or environment variables.")
val password = properties.getProperty("SONATYPE_PASSWORD_TOKEN") ?: System.getenv("SONATYPE_PASSWORD_TOKEN")
?: throw GradleException("GPG_PASSPHRASE not found in local.properties or environment variables.")

credentials {
this.username = username
this.password = password
}
authentication {
create<BasicAuthentication>("basic")
}
}
}
}

0 comments on commit 98790a0

Please sign in to comment.