Skip to content

Commit

Permalink
build: add release signing config for fdroidRelease
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasGGamerM committed Dec 15, 2023
1 parent 522763b commit 167a2e1
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion mastodon/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,28 @@ android {
keyPassword = properties.getProperty('SIGNING_KEY_PASSWORD')
}
}

release{
storeFile = file("keystore/release_keystore.jks")
storePassword System.getenv("RELEASE_SIGNING_STORE_PASSWORD")
if (storePassword == null) {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
storePassword = properties.getProperty('RELEASE_SIGNING_STORE_PASSWORD')
}
keyAlias System.getenv("RELEASE_SIGNING_KEY_ALIAS")
if (keyAlias == null) {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
keyAlias = properties.getProperty('RELEASE_SIGNING_KEY_ALIAS')
}
keyPassword System.getenv("RELEASE_SIGNING_KEY_PASSWORD")
if (keyPassword == null) {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
keyPassword = properties.getProperty('RELEASE_SIGNING_KEY_PASSWORD')
}
}
}

buildTypes {
Expand Down Expand Up @@ -81,7 +103,10 @@ android {
versionNameSuffix '-play'
}
githubRelease { initWith release }
fdroidRelease { initWith release }
fdroidRelease {
initWith release
signingConfig signingConfigs.release
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
Expand Down

0 comments on commit 167a2e1

Please sign in to comment.