Skip to content

Commit 0c51e78

Browse files
committed
fix ./android/app/build.gradle release config
1 parent c5276ff commit 0c51e78

File tree

1 file changed

+7
-22
lines changed

1 file changed

+7
-22
lines changed

android/app/build.gradle

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,6 @@ def enableProguardInReleaseBuilds = false
7777
*/
7878
def jscFlavor = 'org.webkit:android-jsc:+'
7979

80-
/**
81-
* Helper function to pull from env, -P props, or project.env (dotenv)
82-
*/
83-
def readVar = { String key ->
84-
def v = System.getenv(key)
85-
if (v == null && project.hasProperty(key)) v = project.property(key)?.toString()
86-
if (v == null && project.hasProperty('env')) {
87-
def m = project.property('env')
88-
if (m instanceof Map || m instanceof Properties) {
89-
v = m.get(key)?.toString()
90-
}
91-
}
92-
return v
93-
}
94-
9580
android {
9681
ndkVersion rootProject.ext.ndkVersion
9782
buildToolsVersion rootProject.ext.buildToolsVersion
@@ -112,15 +97,15 @@ android {
11297
}
11398
signingConfigs {
11499
release {
115-
def ksFile = readVar('ANDROID_UPLOAD_STORE_FILE')
116-
def ksPass = readVar('ANDROID_UPLOAD_STORE_PASSWORD')
117-
def keyAlias = readVar('ANDROID_UPLOAD_KEY_ALIAS')
118-
def keyPass = readVar('ANDROID_UPLOAD_KEY_PASSWORD')
100+
def ksPath = System.getenv('ANDROID_NAVIGATOR_APP_UPLOAD_STORE_FILE') ?: project.findProperty('ANDROID_NAVIGATOR_APP_UPLOAD_STORE_FILE')
101+
def ksPass = System.getenv('ANDROID_NAVIGATOR_APP_UPLOAD_STORE_PASSWORD') ?: project.findProperty('ANDROID_NAVIGATOR_APP_UPLOAD_STORE_PASSWORD')
102+
def keyAliasName = System.getenv('ANDROID_NAVIGATOR_APP_UPLOAD_KEY_ALIAS') ?: project.findProperty('ANDROID_NAVIGATOR_APP_UPLOAD_KEY_ALIAS')
103+
def keyPass = System.getenv('ANDROID_NAVIGATOR_APP_UPLOAD_KEY_PASSWORD') ?: project.findProperty('ANDROID_NAVIGATOR_APP_UPLOAD_KEY_PASSWORD')
119104

120-
if (ksFile && ksPass && keyAlias && keyPass) {
121-
storeFile file(ksFile)
105+
if (ksPath && ksPass && keyAliasName && keyPass) {
106+
storeFile file(ksPath)
122107
storePassword ksPass
123-
keyAlias keyAlias
108+
keyAlias keyAliasName
124109
keyPassword keyPass
125110
}
126111
}

0 commit comments

Comments
 (0)