@@ -18,6 +18,9 @@ import com.android.build.OutputFile
18
18
* // the entry file for bundle generation
19
19
* entryFile: "index.android.js",
20
20
*
21
+ * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
22
+ * bundleCommand: "ram-bundle",
23
+ *
21
24
* // whether to bundle JS and assets in debug mode
22
25
* bundleInDebug: false,
23
26
*
@@ -93,6 +96,15 @@ def enableSeparateBuildPerCPUArchitecture = false
93
96
*/
94
97
def enableProguardInReleaseBuilds = false
95
98
99
+ /**
100
+ * Use international variant JavaScriptCore
101
+ * International variant includes ICU i18n library and necessary data allowing to use
102
+ * e.g. Date.toLocaleString and String.localeCompare that give correct results
103
+ * when using with locales other than en-US.
104
+ * Note that this variant is about 6MiB larger per architecture than default.
105
+ */
106
+ def useIntlJsc = false
107
+
96
108
android {
97
109
compileSdkVersion rootProject. ext. compileSdkVersion
98
110
@@ -116,8 +128,22 @@ android {
116
128
include " armeabi-v7a" , " x86" , " arm64-v8a" , " x86_64"
117
129
}
118
130
}
131
+ signingConfigs {
132
+ debug {
133
+ storeFile file(' debug.keystore' )
134
+ storePassword ' android'
135
+ keyAlias ' androiddebugkey'
136
+ keyPassword ' android'
137
+ }
138
+ }
119
139
buildTypes {
140
+ debug {
141
+ signingConfig signingConfigs. debug
142
+ }
120
143
release {
144
+ // Caution! In production, you need to generate your own keystore file.
145
+ // see https://facebook.github.io/react-native/docs/signed-apk-android.
146
+ signingConfig signingConfigs. debug
121
147
minifyEnabled enableProguardInReleaseBuilds
122
148
proguardFiles getDefaultProguardFile(" proguard-android.txt" ), " proguard-rules.pro"
123
149
}
@@ -126,8 +152,8 @@ android {
126
152
applicationVariants. all { variant ->
127
153
variant. outputs. each { output ->
128
154
// For each separate APK per architecture, set a unique version code as described here:
129
- // http ://tools .android.com/tech-docs/new- build-system/user-guide/ apk-splits
130
- def versionCodes = [" armeabi-v7a" :1 , " x86" :2 , " arm64-v8a" : 3 , " x86_64" : 4 ]
155
+ // https ://developer .android.com/studio/ build/configure- apk-splits.html
156
+ def versionCodes = [" armeabi-v7a" : 1 , " x86" : 2 , " arm64-v8a" : 3 , " x86_64" : 4 ]
131
157
def abi = output. getFilter(OutputFile . ABI )
132
158
if (abi != null ) { // null for the universal-debug, universal-release variants
133
159
output. versionCodeOverride =
@@ -138,13 +164,15 @@ android {
138
164
}
139
165
140
166
dependencies {
141
- implementation project(' :react-native-gesture-handler' )
142
- implementation project(' :react-native-vector-icons' )
143
- implementation project(' :react-native-image-picker' )
144
- implementation project(' :react-native-fast-image' )
145
167
implementation fileTree(dir : " libs" , include : [" *.jar" ])
146
- implementation " com.android.support:appcompat-v7:${ rootProject.ext.supportLibVersion} "
147
168
implementation " com.facebook.react:react-native:+" // From node_modules
169
+
170
+ // JSC from node_modules
171
+ if (useIntlJsc) {
172
+ implementation ' org.webkit:android-jsc-intl:+'
173
+ } else {
174
+ implementation ' org.webkit:android-jsc:+'
175
+ }
148
176
}
149
177
150
178
// Run this once to be able to run the application with BUCK
@@ -153,3 +181,6 @@ task copyDownloadableDepsToLibs(type: Copy) {
153
181
from configurations. compile
154
182
into ' libs'
155
183
}
184
+
185
+ apply from : " ../../node_modules/react-native-vector-icons/fonts.gradle"
186
+ apply from : file(" ../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle" ); applyNativeModulesAppBuildGradle(project)
0 commit comments