@@ -18,6 +18,9 @@ import com.android.build.OutputFile
1818 * // the entry file for bundle generation
1919 * entryFile: "index.android.js",
2020 *
21+ * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
22+ * bundleCommand: "ram-bundle",
23+ *
2124 * // whether to bundle JS and assets in debug mode
2225 * bundleInDebug: false,
2326 *
@@ -93,9 +96,22 @@ def enableSeparateBuildPerCPUArchitecture = false
9396 */
9497def enableProguardInReleaseBuilds = false
9598
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+
96108android {
97109 compileSdkVersion rootProject. ext. compileSdkVersion
98- buildToolsVersion rootProject. ext. buildToolsVersion
110+
111+ compileOptions {
112+ sourceCompatibility JavaVersion . VERSION_1_8
113+ targetCompatibility JavaVersion . VERSION_1_8
114+ }
99115
100116 defaultConfig {
101117 applicationId " com.instabugsample"
@@ -109,11 +125,25 @@ android {
109125 reset()
110126 enable enableSeparateBuildPerCPUArchitecture
111127 universalApk false // If true, also generate a universal APK
112- include " armeabi-v7a" , " x86" , " arm64-v8a"
128+ include " armeabi-v7a" , " x86" , " arm64-v8a" , " x86_64"
129+ }
130+ }
131+ signingConfigs {
132+ debug {
133+ storeFile file(' debug.keystore' )
134+ storePassword ' android'
135+ keyAlias ' androiddebugkey'
136+ keyPassword ' android'
113137 }
114138 }
115139 buildTypes {
140+ debug {
141+ signingConfig signingConfigs. debug
142+ }
116143 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
117147 minifyEnabled enableProguardInReleaseBuilds
118148 proguardFiles getDefaultProguardFile(" proguard-android.txt" ), " proguard-rules.pro"
119149 }
@@ -122,8 +152,8 @@ android {
122152 applicationVariants. all { variant ->
123153 variant. outputs. each { output ->
124154 // For each separate APK per architecture, set a unique version code as described here:
125- // http ://tools .android.com/tech-docs/new- build-system/user-guide/ apk-splits
126- def versionCodes = [" armeabi-v7a" :1 , " x86" :2 , " arm64-v8a" : 3 ]
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 ]
127157 def abi = output. getFilter(OutputFile . ABI )
128158 if (abi != null ) { // null for the universal-debug, universal-release variants
129159 output. versionCodeOverride =
@@ -134,10 +164,15 @@ android {
134164}
135165
136166dependencies {
137- implementation project(' :instabug-reactnative' )
138167 implementation fileTree(dir : " libs" , include : [" *.jar" ])
139- implementation " com.android.support:appcompat-v7:${ rootProject.ext.supportLibVersion} "
140168 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+ }
141176}
142177
143178// Run this once to be able to run the application with BUCK
@@ -146,3 +181,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
146181 from configurations. compile
147182 into ' libs'
148183}
184+
185+ apply from : file(" ../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle" ); applyNativeModulesAppBuildGradle(project)
0 commit comments