Slackbot
01/08/2024, 6:05 PMMartin
01/08/2024, 6:08 PMmaven {
name = "ossStaging"
uri("...")
credentials {
username = System.getenv("SONATYPE_NEXUS_USERNAME")
password = System.getenv("SONATYPE_NEXUS_PASSWORD")
}
}Caleb Cushing
01/08/2024, 6:10 PMMartin
01/08/2024, 6:10 PMephemient
01/08/2024, 6:11 PMrepositories {
maven {
credentials(PasswordCredentials::class)
}
}
over System.getenv. it pulls from Gradle properties, although you can still specify those via environment if neededCaleb Cushing
01/08/2024, 6:11 PMMartin
01/08/2024, 6:11 PMcredentials {
username = findProperty("SONATYPE_NEXUS_USERNAME").toString()
password = findProperty("SONATYPE_NEXUS_PASSWORD").toString()
}Caleb Cushing
01/08/2024, 6:12 PMephemient
01/08/2024, 6:12 PMephemient
01/08/2024, 6:13 PMCaleb Cushing
01/08/2024, 6:13 PMephemient
01/08/2024, 6:13 PMCaleb Cushing
01/08/2024, 6:13 PMCaleb Cushing
01/08/2024, 6:13 PMephemient
01/08/2024, 6:14 PMephemient
01/08/2024, 6:14 PMusername = providers.gradleProperty("...")Caleb Cushing
01/08/2024, 6:15 PMephemient
01/08/2024, 6:16 PMMartin
01/08/2024, 6:17 PMgradle.properties file, how is that different from the secret being in ~.gradle/configuration-cache/something ? File permissions maybe?Caleb Cushing
01/08/2024, 6:18 PMEli Graber
01/08/2024, 6:18 PMEli Graber
01/08/2024, 6:19 PMCaleb Cushing
01/08/2024, 6:20 PMCaleb Cushing
01/08/2024, 6:20 PMCaleb Cushing
01/08/2024, 6:21 PMephemient
01/08/2024, 6:21 PMCaleb Cushing
01/08/2024, 6:21 PMCaleb Cushing
01/08/2024, 6:21 PMephemient
01/08/2024, 6:22 PMrepositories {
maven { name = "foo" }
maven { name = "bar" }
`fooUsername`/`fooPassword` and `barUsername`/`barPassword`ephemient
01/08/2024, 6:23 PMurl. if you have conflicting names you have problems regardless of credentialsCaleb Cushing
01/08/2024, 6:24 PMmaven("<https://org.jfrog.io/artifactory/org-dcp>") {
credentials {
username = findProperty("artifactoryUsername").toString()
password = findProperty("artifactoryPassword").toString()
}
}
maven("<https://org.jfrog.io/artifactory/plugins-release>") {
credentials {
username = findProperty("artifactoryUsername").toString()
password = findProperty("artifactoryPassword").toString()
}
}Caleb Cushing
01/08/2024, 6:24 PMephemient
01/08/2024, 6:24 PMCaleb Cushing
01/08/2024, 6:25 PMCaleb Cushing
01/08/2024, 6:25 PMCaleb Cushing
01/08/2024, 6:25 PMCaleb Cushing
01/08/2024, 6:26 PMCaleb Cushing
01/08/2024, 6:28 PMartifactoryUsername , is that the simplest and most secure thing that can work?ephemient
01/08/2024, 6:28 PMCaleb Cushing
01/08/2024, 6:28 PMephemient
01/08/2024, 6:29 PMCaleb Cushing
01/08/2024, 6:29 PM