Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // read property from local.properties file
- Properties local = new Properties()
- local.load(project.rootProject.file('local.properties').newDataInputStream())
- // publish to private repository
- apply plugin: 'maven'
- uploadArchives {
- def username = local.getProperty("repo.username")
- def password = local.getProperty("repo.password")
- def snapshotUrl = local.getProperty("repo.url.snapshot")
- def releaseUrl = local.getProperty("repo.url.release")
- def url = library_version.contains("SNAPSHOT") ? snapshotUrl : releaseUrl
- repositories {
- mavenDeployer {
- repository(url: url) {
- authentication(userName: username, password: password)
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement