Skip to content

Commit c75caf5

Browse files
committed
Use v1 scheme signature for FOSS flavor
1 parent f8e4168 commit c75caf5

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

xkcd/build.gradle

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)