Skip to content

Commit

Permalink
Make keystore.properties optional to build
Browse files Browse the repository at this point in the history
  • Loading branch information
Wirtos committed Dec 2, 2024
1 parent 4a8321a commit f816c33
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ def keystorePropertiesFile = rootProject.file("keystore.properties")
// Initialize a new Properties() object called keystoreProperties.
def keystoreProperties = new Properties()

if (keystorePropertiesFile.exists()) {
// Load your keystore.properties file into the keystoreProperties object.
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdk 31
// last ndk version that supports deprecated architectures
Expand All @@ -27,10 +28,12 @@ android {
}
signingConfigs {
release {
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
if (!keystoreProperties.isEmpty()) {
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
}
}
}

Expand Down

0 comments on commit f816c33

Please sign in to comment.