This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin:"maven-publish" | |
// Other closure blocks | |
publishing { | |
publications { | |
maven(MavenPublication) { | |
from components.java | |
} | |
} | |
repositories { | |
maven { | |
credentials { | |
username NEXUS_USERNAME | |
password NEXUS_PASSWORD | |
} | |
url "https://[my.nexus.repo]/repository/releases/" | |
} | |
} | |
} |
Above, the NEXUS_USERNAME and NEXUS_PASSWORD are parameters that you store in gradle.properties and can overwrite with command line parameters, such as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./gradlew -PNEXUS_USERNAME=[your_username] -PNEXUS_PASSWORD=[your_password] publish |
No comments:
Post a Comment