@@ -2,7 +2,6 @@ apply plugin: "com.android.application"
22apply from : " ../../node_modules/react-native-vector-icons/fonts.gradle"
33
44import com.android.build.OutputFile
5- import org.apache.tools.ant.taskdefs.condition.Os
65
76project. ext. react = [
87 enableHermes : false , // clean and rebuild if changing
@@ -49,17 +48,13 @@ android {
4948 " GENERATED_SRC_DIR=$buildDir /generated/source" ,
5049 " PROJECT_BUILD_DIR=$buildDir " ,
5150 " REACT_ANDROID_DIR=$rootDir /../node_modules/react-native/ReactAndroid" ,
52- " REACT_ANDROID_BUILD_DIR=$rootDir /../node_modules/react-native/ReactAndroid/build"
51+ " REACT_ANDROID_BUILD_DIR=$rootDir /../node_modules/react-native/ReactAndroid/build" ,
52+ " NODE_MODULES_DIR=$rootDir /../node_modules"
5353 cFlags " -Wall" , " -Werror" , " -fexceptions" , " -frtti" , " -DWITH_INSPECTOR=1"
5454 cppFlags " -std=c++17"
5555 // Make sure this target name is the same you specify inside the
5656 // src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
5757 targets " rntypescriptboilerplate_appmodules"
58-
59- // Fix for windows limit on number of character in file paths and in command lines
60- if (Os . isFamily(Os . FAMILY_WINDOWS )) {
61- arguments " NDK_APP_SHORT_COMMANDS=true"
62- }
6358 }
6459 }
6560 if (! enableSeparateBuildPerCPUArchitecture) {
@@ -188,9 +183,10 @@ dependencies {
188183 }
189184
190185 if (enableHermes) {
191- def hermesPath = " ../../node_modules/hermes-engine/android/" ;
192- debugImplementation files(hermesPath + " hermes-debug.aar" )
193- releaseImplementation files(hermesPath + " hermes-release.aar" )
186+ // noinspection GradleDynamicVersion
187+ implementation(" com.facebook.react:hermes-engine:+" ) { // From node_modules
188+ exclude group :' com.facebook.fbjni'
189+ }
194190 } else {
195191 implementation jscFlavor
196192 }
@@ -203,7 +199,11 @@ if (isNewArchitectureEnabled()) {
203199 configurations. all {
204200 resolutionStrategy. dependencySubstitution {
205201 substitute(module(" com.facebook.react:react-native" ))
206- .using(project(" :ReactAndroid" )). because(" On New Architecture we're building React Native from source" )
202+ .using(project(" :ReactAndroid" ))
203+ .because(" On New Architecture we're building React Native from source" )
204+ substitute(module(" com.facebook.react:hermes-engine" ))
205+ .using(project(" :ReactAndroid:hermes-engine" ))
206+ .because(" On New Architecture we're building Hermes from source" )
207207 }
208208 }
209209}
0 commit comments