File tree Expand file tree Collapse file tree 2 files changed +24
-9
lines changed
examples/SampleApp/android Expand file tree Collapse file tree 2 files changed +24
-9
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,18 @@ apply plugin: 'com.google.gms.google-services'
44apply plugin : ' com.google.firebase.crashlytics'
55apply plugin : " com.facebook.react"
66
7+ // Some libraries look up the React Native location on the application project
8+ // instead of the root project. Mirror the root setting here so they never need
9+ // to shell out to a bare `node` binary just to resolve react-native.
10+ ext. REACT_NATIVE_NODE_MODULES_DIR =
11+ rootProject. ext. has(" REACT_NATIVE_NODE_MODULES_DIR" )
12+ ? rootProject. ext. get(" REACT_NATIVE_NODE_MODULES_DIR" )
13+ : file(" $rootDir /../node_modules/react-native" ). absolutePath
14+ ext. REACT_NATIVE_WORKLETS_NODE_MODULES_DIR =
15+ rootProject. ext. has(" REACT_NATIVE_WORKLETS_NODE_MODULES_DIR" )
16+ ? rootProject. ext. get(" REACT_NATIVE_WORKLETS_NODE_MODULES_DIR" )
17+ : file(" $rootDir /../node_modules/react-native-worklets" ). absolutePath
18+
719/**
820 * This is the configuration block to customize your React Native Android app.
921 * By default you don't need to apply any configuration, just uncomment the lines you need.
Original file line number Diff line number Diff line change @@ -26,6 +26,16 @@ buildscript {
2626 }
2727}
2828
29+ ext. REACT_NATIVE_NODE_MODULES_DIR = file(" $rootDir /../node_modules/react-native" ). absolutePath
30+ ext. REACT_NATIVE_WORKLETS_NODE_MODULES_DIR =
31+ file(" $rootDir /../node_modules/react-native-worklets" ). absolutePath
32+
33+ subprojects { subproject ->
34+ if (subproject. path != " :app" ) {
35+ evaluationDependsOn(" :app" )
36+ }
37+ }
38+
2939allprojects {
3040 repositories {
3141 maven {
@@ -39,15 +49,8 @@ allprojects {
3949}
4050
4151project(' :app' ) {
42- afterEvaluate {
43- if (tasks. findByName(" preBuild" )) {
44- tasks. preBuild. doFirst {
45- exec {
46- workingDir rootDir
47- commandLine ' ./gradlew' , ' generateCodegenArtifactsFromSchema'
48- }
49- }
50- }
52+ tasks. matching { it. name == " preBuild" }. configureEach {
53+ dependsOn(" generateCodegenArtifactsFromSchema" )
5154 }
5255}
5356
You can’t perform that action at this time.
0 commit comments