File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed
Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,27 @@ if (hasGoogleServicesJson) {
99 apply (plugin = " com.google.firebase.crashlytics" )
1010}
1111
12+ fun getPropertyOrEnv (propertyName : String , envName : String = propertyName): String? {
13+ return if (project.hasProperty(propertyName)) {
14+ project.property(propertyName) as String
15+ } else {
16+ System .getenv(envName)
17+ }
18+ }
19+
1220android {
1321 signingConfigs {
1422 create(" release" ) {
15- if (project.hasProperty(" NETBIRD_UPLOAD_STORE_FILE" )) {
16- storeFile = file(project.property(" NETBIRD_UPLOAD_STORE_FILE" ) as String )
17- storePassword = project.property(" NETBIRD_UPLOAD_STORE_PASSWORD" ) as String
18- keyAlias = project.property(" NETBIRD_UPLOAD_KEY_ALIAS" ) as String
19- keyPassword = project.property(" NETBIRD_UPLOAD_KEY_PASSWORD" ) as String
23+ val storeFile = getPropertyOrEnv(" NETBIRD_UPLOAD_STORE_FILE" )
24+ val storePassword = getPropertyOrEnv(" NETBIRD_UPLOAD_STORE_PASSWORD" )
25+ val keyAlias = getPropertyOrEnv(" NETBIRD_UPLOAD_KEY_ALIAS" )
26+ val keyPassword = getPropertyOrEnv(" NETBIRD_UPLOAD_KEY_PASSWORD" )
27+
28+ if (storeFile != null ) {
29+ this .storeFile = file(storeFile)
30+ this .storePassword = storePassword
31+ this .keyAlias = keyAlias
32+ this .keyPassword = keyPassword
2033 }
2134 }
2235 }
You can’t perform that action at this time.
0 commit comments