Browse Source

Move keystore properties in own file

This allows to sync gradle.properties with git
Arnaud Vergnet 3 years ago
parent
commit
19d856574e
3 changed files with 39 additions and 7 deletions
  1. 1
    1
      .gitignore
  2. 11
    6
      android/app/build.gradle
  3. 27
    0
      android/gradle.properties

+ 1
- 1
.gitignore View File

@@ -42,7 +42,7 @@ buck-out/
42 42
 *.keystore
43 43
 !debug.keystore
44 44
 *.jks
45
-/android/gradle.properties
45
+/android/keystores/release.keystore.properties
46 46
 
47 47
 # fastlane
48 48
 #

+ 11
- 6
android/app/build.gradle View File

@@ -124,6 +124,13 @@ def jscFlavor = 'org.webkit:android-jsc:+'
124 124
  */
125 125
 def enableHermes = project.ext.react.get("enableHermes", false);
126 126
 
127
+/**
128
+ * Load release keystore
129
+ */
130
+def keystorePropertiesFile = rootProject.file("keystores/release.keystore.properties");
131
+def keystoreProperties = new Properties()
132
+keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
133
+
127 134
 android {
128 135
     compileSdkVersion rootProject.ext.compileSdkVersion
129 136
 
@@ -156,12 +163,10 @@ android {
156 163
             keyPassword 'android'
157 164
         }
158 165
         release {
159
-            if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
160
-                storeFile file(MYAPP_UPLOAD_STORE_FILE)
161
-                storePassword MYAPP_UPLOAD_STORE_PASSWORD
162
-                keyAlias MYAPP_UPLOAD_KEY_ALIAS
163
-                keyPassword MYAPP_UPLOAD_KEY_PASSWORD
164
-            }
166
+            storeFile file(keystoreProperties['UPLOAD_STORE_FILE'])
167
+            storePassword keystoreProperties['UPLOAD_STORE_PASSWORD']
168
+            keyAlias keystoreProperties['UPLOAD_KEY_ALIAS']
169
+            keyPassword keystoreProperties['UPLOAD_KEY_PASSWORD']
165 170
         }
166 171
     }
167 172
     buildTypes {

+ 27
- 0
android/gradle.properties View File

@@ -0,0 +1,27 @@
1
+# Project-wide Gradle settings.
2
+
3
+# IDE (e.g. Android Studio) users:
4
+# Gradle settings configured through the IDE *will override*
5
+# any settings specified in this file.
6
+
7
+# For more details on how to configure your build environment visit
8
+# http://www.gradle.org/docs/current/userguide/build_environment.html
9
+
10
+# Specifies the JVM arguments used for the daemon process.
11
+# The setting is particularly useful for tweaking memory settings.
12
+# Default value: -Xmx10248m -XX:MaxPermSize=256m
13
+# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14
+
15
+# When configured, Gradle will run in incubating parallel mode.
16
+# This option should only be used with decoupled projects. More details, visit
17
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18
+# org.gradle.parallel=true
19
+
20
+# AndroidX package structure to make it clearer which packages are bundled with the
21
+# Android operating system, and which are packaged with your app's APK
22
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
23
+android.useAndroidX=true
24
+# Automatically convert third-party libraries to use AndroidX
25
+android.enableJetifier=true
26
+# Version of flipper SDK to use with React Native
27
+FLIPPER_VERSION=0.37.0

Loading…
Cancel
Save