File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,19 @@ buildscript {
30
30
mavenCentral()
31
31
}
32
32
dependencies {
33
- classpath ' com.android.tools.build:gradle:4.1.3 '
33
+ classpath ' com.android.tools.build:gradle:7.2.1 '
34
34
}
35
35
}
36
36
}
37
37
38
+ def isNewArchitectureEnabled () {
39
+ return project. hasProperty(" newArchEnabled" ) && project. newArchEnabled == " true"
40
+ }
41
+
42
+ if (isNewArchitectureEnabled()) {
43
+ apply plugin : ' com.facebook.react'
44
+ }
45
+
38
46
android {
39
47
compileSdkVersion safeExtGet(' compileSdkVersion' , 30 )
40
48
buildToolsVersion safeExtGet(' buildToolsVersion' , ' 28.0.3' )
@@ -55,6 +63,15 @@ android {
55
63
}
56
64
productFlavors {
57
65
}
66
+ sourceSets {
67
+ main {
68
+ if (isNewArchitectureEnabled()) {
69
+ java. srcDirs + = [' src/newarch' ]
70
+ } else {
71
+ java. srcDirs + = [' src/oldarch' ]
72
+ }
73
+ }
74
+ }
58
75
}
59
76
60
77
dependencies {
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3
3
distributionPath =wrapper/dists
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
6
- distributionUrl =https\://services.gradle.org/distributions/gradle-6 .5.1-all.zip
6
+ distributionUrl =https\://services.gradle.org/distributions/gradle-7 .5.1-all.zip
You can’t perform that action at this time.
0 commit comments