Skip to content

Commit 39a6c57

Browse files
author
OpusDevs
committed
build: add release signing config for Play Store AAB
1 parent 41dd0d3 commit 39a6c57

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

‎android/.gitignore‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ build/
2626
# Local configuration file (sdk path, etc)
2727
local.properties
2828

29+
# Signing secrets — never commit these
30+
keystore.properties
31+
*.jks
32+
*.keystore
33+
2934
# Proguard folder generated by Eclipse
3035
proguard/
3136

‎android/app/build.gradle‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
apply plugin: 'com.android.application'
22

3+
def keystorePropertiesFile = rootProject.file("keystore.properties")
4+
def keystoreProperties = new Properties()
5+
if (keystorePropertiesFile.exists()) {
6+
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
7+
}
8+
39
android {
410
namespace = "com.opengis.app"
511
compileSdk = rootProject.ext.compileSdkVersion
@@ -16,10 +22,19 @@ android {
1622
ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
1723
}
1824
}
25+
signingConfigs {
26+
release {
27+
keyAlias keystoreProperties['keyAlias']
28+
keyPassword keystoreProperties['keyPassword']
29+
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
30+
storePassword keystoreProperties['storePassword']
31+
}
32+
}
1933
buildTypes {
2034
release {
2135
minifyEnabled false
2236
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
37+
signingConfig signingConfigs.release
2338
}
2439
}
2540
}

0 commit comments

Comments
 (0)