diff --git a/.gitignore b/.gitignore index d356a39..7e5503c 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,7 @@ ios/Index/DataStore build/ .idea .gradle -local.properties +*.properties *.iml *.hprof diff --git a/android/app/build.gradle b/android/app/build.gradle index 3172475..0605e3f 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,6 +1,8 @@ apply plugin: "com.android.application" import com.android.build.OutputFile +import java.util.Properties +import java.io.FileInputStream /** * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets @@ -125,6 +127,16 @@ def enableHermes = project.ext.react.get("enableHermes", false); */ def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures") +// Create a variable called keystorePropertiesFile, and initialize it to your +// keystore.properties file, in the rootProject folder. +def keystorePropertiesFile = rootProject.file("keystore.properties") + +// Initialize a new Properties() object called keystoreProperties. +def keystoreProperties = new Properties() + +// Load your keystore.properties file into the keystoreProperties object. +keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) + android { ndkVersion rootProject.ext.ndkVersion compileSdkVersion rootProject.ext.compileSdkVersion @@ -150,6 +162,10 @@ android { keyPassword 'android' } release { + storeFile file('drip-release-key.keystore') + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storePassword keystoreProperties['storePassword'] if (project.hasProperty('DRIP_RELEASE_STORE_FILE')) { storeFile file(DRIP_RELEASE_STORE_FILE) storePassword DRIP_RELEASE_STORE_PASSWORD