File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,20 @@ android {
9090 keyPassword project. hasProperty(" ALIAS_PASS" ) ? ALIAS_PASS : (System . getenv(" ALIAS_PASS" ) ? System . getenv(" ALIAS_PASS" ) : properties. getProperty(" ALIAS_PASS" ))
9191 }
9292 }
93+ releaseFossConfig {
94+ File key = file(" ../key.jks" )
95+ if (key. exists()) {
96+ storeFile key
97+ Properties properties = new Properties ()
98+ File localProperty = file(' ../local.properties' )
99+ if (localProperty. exists())
100+ properties. load(localProperty. newDataInputStream())
101+ storePassword project. hasProperty(" KEYSTORE_PASS" ) ? KEYSTORE_PASS : (System . getenv(" KEYSTORE_PASS" ) ? System . getenv(" KEYSTORE_PASS" ) : properties. getProperty(" KEYSTORE_PASS" ))
102+ keyAlias project. hasProperty(" ALIAS_NAME" ) ? ALIAS_NAME : (System . getenv(" ALIAS_NAME" ) ? System . getenv(" ALIAS_NAME" ) : properties. getProperty(" ALIAS_NAME" ))
103+ keyPassword project. hasProperty(" ALIAS_PASS" ) ? ALIAS_PASS : (System . getenv(" ALIAS_PASS" ) ? System . getenv(" ALIAS_PASS" ) : properties. getProperty(" ALIAS_PASS" ))
104+ }
105+ v2SigningEnabled false
106+ }
93107 }
94108
95109 buildTypes {
@@ -110,7 +124,12 @@ android {
110124 zipAlignEnabled true
111125 shrinkResources true
112126 proguardFiles getDefaultProguardFile(' proguard-android-optimize.txt' ), ' proguard-rules.pro'
113- signingConfig signingConfigs. releaseConfig
127+ if (isProprietary) {
128+ signingConfig signingConfigs. releaseConfig
129+ } else {
130+ // https://gitlab.com/fdroid/fdroidserver/issues/697#note_229584776
131+ signingConfig signingConfigs. releaseFossConfig
132+ }
114133 multiDexEnabled false
115134 }
116135 }
You can’t perform that action at this time.
0 commit comments