From d557f2a98d79fa542035c06cc1022314cfdc0ccb Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Tue, 24 Mar 2020 17:59:15 +0800 Subject: [PATCH] update android script --- doric-android/scripts/upload.gradle | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/doric-android/scripts/upload.gradle b/doric-android/scripts/upload.gradle index cfd9cee1..77ce4531 100644 --- a/doric-android/scripts/upload.gradle +++ b/doric-android/scripts/upload.gradle @@ -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) } } }