@@ -73,7 +73,7 @@ import com.android.build.OutputFile
7373 */
7474
7575project. ext. react = [
76- entryFile : " index.js"
76+ entryFile : " index.js"
7777]
7878
7979apply from : " ../../node_modules/react-native/react.gradle"
@@ -93,6 +93,10 @@ def enableSeparateBuildPerCPUArchitecture = false
9393 */
9494def enableProguardInReleaseBuilds = false
9595
96+ def jscFlavor = ' org.webkit:android-jsc:+'
97+
98+ def enableHermes = project. ext. react. get(" enableHermes" , false );
99+
96100android {
97101 compileSdkVersion rootProject. ext. compileSdkVersion
98102 buildToolsVersion rootProject. ext. buildToolsVersion
@@ -110,6 +114,7 @@ android {
110114 packagingOptions {
111115 exclude " lib/arm64-v8a/libgnustl_shared.so"
112116 }
117+ missingDimensionStrategy " RNN.reactNativeVersion" , " reactNative60"
113118 }
114119 compileOptions {
115120 sourceCompatibility JavaVersion . VERSION_1_8
@@ -134,7 +139,7 @@ android {
134139 variant. outputs. each { output ->
135140 // For each separate APK per architecture, set a unique version code as described here:
136141 // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
137- def versionCodes = [" armeabi-v7a" :1 , " x86" :2 , " arm64-v8a" : 3 ]
142+ def versionCodes = [" armeabi-v7a" : 1 , " x86" : 2 , " arm64-v8a" : 3 ]
138143 def abi = output. getFilter(OutputFile . ABI )
139144 if (abi != null ) { // null for the universal-debug, universal-release variants
140145 output. versionCodeOverride =
@@ -147,12 +152,20 @@ android {
147152dependencies {
148153 implementation fileTree(dir : " libs" , include : [" *.jar" ])
149154 implementation " com.android.support:appcompat-v7:${ rootProject.ext.supportLibVersion} "
150- implementation " com.facebook.react:react-native:+ " // From node_modules
155+ implementation " com.facebook.react:react-native:0.61.5 " // From node_modules
151156 implementation project(' :react-native-navigation' )
152157
153158 implementation " com.android.support:design:${ rootProject.ext.supportLibVersion} "
154159 implementation " com.android.support:appcompat-v7:${ rootProject.ext.supportLibVersion} "
155160 implementation " com.android.support:support-v4:${ rootProject.ext.supportLibVersion} "
161+
162+ if (enableHermes) {
163+ def hermesPath = " ../../node_modules/hermes-engine/android/" ;
164+ debugImplementation files(hermesPath + " hermes-debug.aar" )
165+ releaseImplementation files(hermesPath + " hermes-release.aar" )
166+ } else {
167+ implementation jscFlavor
168+ }
156169}
157170
158171// Run this once to be able to run the application with BUCK
0 commit comments