Skip to content

Instantly share code, notes, and snippets.

@lifuzu
Created December 12, 2013 05:52
Show Gist options
  • Save lifuzu/7923736 to your computer and use it in GitHub Desktop.
Save lifuzu/7923736 to your computer and use it in GitHub Desktop.
Configure the snapshot and the release repository for Gradle
//configure the snapshot and the release repository in the 'Upload' task (e.g. the 'uploadArchives') task:
uploadArchives {
repositories {
mavenDeployer {
repository(url: 'http://myCompanyRepo.com:8081/releases') {
authentication(userName: 'admin', password: 'password');
}
snapshotRepository(url: 'http://myCompanyRepo.com:8081/snapshots') {
authentication(userName: 'admin', password: 'password');
}
}
}
}
//for *-SNAPSHOT versions the snapshotRepository is used. Otherwise the releses repo is used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment