Last active
February 18, 2022 09:48
-
-
Save GuilhE/f6dd48c0b23fdd4e79aec9b6b9b7ae31 to your computer and use it in GitHub Desktop.
Gradle configurations to be used with bitbucket-pipelines.yml or firebaseLocalDistribution.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.android.build.gradle.internal.dsl.SigningConfig | |
import java.io.FileInputStream | |
import java.util.* | |
signingConfigs { | |
if (File("signing.properties").exists()) { | |
create("releaseDistribution") { | |
val prop = Properties().apply { load(FileInputStream(File("signing.properties"))) } | |
storeFile = File(prop.getProperty("keystorePath")) | |
storePassword = prop.getProperty("keystorePassword") | |
keyAlias = prop.getProperty("keyAlias") | |
keyPassword = prop.getProperty("keyPassword") | |
} | |
} | |
} | |
buildTypes { | |
getByName("release") { | |
//... | |
if (File("signing.properties").exists()) { | |
signingConfig = signingConfigs.getByName("releaseDistribution") | |
} | |
firebaseAppDistribution { | |
groups = "testers" | |
if (File("releasenotes.txt").exists()) { | |
releaseNotesFile = "releasenotes.txt" | |
} | |
} | |
} | |
{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To be used with: