Skip to content

Commit

Permalink
Set maven username and password flexibly
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellansun committed Jan 12, 2025
1 parent f64eaa9 commit c96bed9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ publishing {
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username project.property('mavenUsername')
password project.property('mavenPassword')
username = project.hasProperty('mavenUsername') ? project.property('mavenUsername') : System.getenv('MAVEN_USERNAME')
password = project.hasProperty('mavenPassword') ? project.property('mavenPassword') : System.getenv('MAVEN_PASSWORD')
}
}
}
Expand Down

0 comments on commit c96bed9

Please sign in to comment.