Chore: Store android keystore properties in separate file
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ ios/Index/DataStore
|
|||||||
build/
|
build/
|
||||||
.idea
|
.idea
|
||||||
.gradle
|
.gradle
|
||||||
local.properties
|
*.properties
|
||||||
*.iml
|
*.iml
|
||||||
*.hprof
|
*.hprof
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
apply plugin: "com.android.application"
|
apply plugin: "com.android.application"
|
||||||
|
|
||||||
import com.android.build.OutputFile
|
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
|
* 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")
|
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 {
|
android {
|
||||||
ndkVersion rootProject.ext.ndkVersion
|
ndkVersion rootProject.ext.ndkVersion
|
||||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
@@ -150,6 +162,10 @@ android {
|
|||||||
keyPassword 'android'
|
keyPassword 'android'
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
|
storeFile file('drip-release-key.keystore')
|
||||||
|
keyAlias keystoreProperties['keyAlias']
|
||||||
|
keyPassword keystoreProperties['keyPassword']
|
||||||
|
storePassword keystoreProperties['storePassword']
|
||||||
if (project.hasProperty('DRIP_RELEASE_STORE_FILE')) {
|
if (project.hasProperty('DRIP_RELEASE_STORE_FILE')) {
|
||||||
storeFile file(DRIP_RELEASE_STORE_FILE)
|
storeFile file(DRIP_RELEASE_STORE_FILE)
|
||||||
storePassword DRIP_RELEASE_STORE_PASSWORD
|
storePassword DRIP_RELEASE_STORE_PASSWORD
|
||||||
|
|||||||
Reference in New Issue
Block a user