Publish Snapshot vs Publish Release in Gradle With Continuous Integration

You can 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 releases repo is used.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)