update android script

This commit is contained in:
pengfei.zhou 2020-03-24 17:59:15 +08:00 committed by osborn
parent 55b338c2fd
commit d557f2a98d

View File

@ -5,6 +5,20 @@ properties.load(project.rootProject.file('scripts/maven.properties').newDataInpu
properties.load(new FileInputStream("${projectDir}/pom.properties"))
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def user = System.getenv("BINTARY_USER")
def apiKey = System.getenv("BINTARY_APIKEY")
def repo = System.getenv("BINTARY_REPO")
if (user == null || user.length() == 0) {
user = properties.user
}
if (apiKey == null || apiKey.length() == 0) {
apiKey = properties.apiKey
}
if (repo == null || repo.length() == 0) {
repo = properties.releasesRepository
}
apply plugin: 'maven'
uploadArchives {
@ -18,8 +32,8 @@ uploadArchives {
description 'git rev-parse HEAD'.execute([], projectDir).text.trim()
}
repository(url: properties.releasesRepository + properties.name) {
authentication(userName: properties.user, password: properties.apiKey)
repository(url: repo + properties.name) {
authentication(userName: user, password: apiKey)
}
}
}