Created
November 15, 2022 09:51
-
-
Save omkar-tenkale/c0246d2bfd49e7de4e0f4aa607c56cec to your computer and use it in GitHub Desktop.
Gradle keystore configuration
This file contains 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
apply plugin: ... | |
def debugKeystorePropertiesFile = rootProject.file("env/debug-keystore.properties"); | |
def debugKeystoreProperties = new Properties() | |
debugKeystoreProperties.load(new FileInputStream(debugKeystorePropertiesFile)) | |
def releaseKeystorePropertiesFile = rootProject.file("env/release-keystore.properties"); | |
def releaseKeystoreProperties = new Properties() | |
if(releaseKeystorePropertiesFile.exists()) { | |
releaseKeystoreProperties.load(new FileInputStream(releaseKeystorePropertiesFile)) | |
} | |
android { | |
... | |
signingConfigs { | |
debug { | |
storeFile file("$rootDir\\env\\debug-keystore.jks") | |
storePassword debugKeystoreProperties['storePassword'] | |
keyAlias debugKeystoreProperties['keyAlias'] | |
keyPassword debugKeystoreProperties['keyPassword'] | |
} | |
release { | |
storeFile file("$rootDir\\env\\release-keystore.jks") | |
storePassword releaseKeystoreProperties['storePassword'] | |
keyAlias releaseKeystoreProperties['keyAlias'] | |
keyPassword releaseKeystoreProperties['keyPassword'] | |
} | |
} | |
buildTypes { | |
debug { | |
... | |
signingConfig signingConfigs.debug | |
} | |
release { | |
... | |
signingConfig signingConfigs.release | |
} | |
} | |
... | |
} |
This file contains 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
<binary file> |
This file contains 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
keyPassword=YOURDEBUGPASSWORD | |
storePassword=YOURDEBUGPASSWORD | |
keyAlias=key0 |
This file contains 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
<binary file> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment