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 {
3030 mavenCentral()
3131 }
3232 dependencies {
33- classpath ' com.android.tools.build:gradle:4.1.3 '
33+ classpath ' com.android.tools.build:gradle:7.2.1 '
3434 }
3535 }
3636}
3737
38+ def isNewArchitectureEnabled () {
39+ return project. hasProperty(" newArchEnabled" ) && project. newArchEnabled == " true"
40+ }
41+
42+ if (isNewArchitectureEnabled()) {
43+ apply plugin : ' com.facebook.react'
44+ }
45+
3846android {
3947 compileSdkVersion safeExtGet(' compileSdkVersion' , 30 )
4048 buildToolsVersion safeExtGet(' buildToolsVersion' , ' 28.0.3' )
@@ -55,6 +63,15 @@ android {
5563 }
5664 productFlavors {
5765 }
66+ sourceSets {
67+ main {
68+ if (isNewArchitectureEnabled()) {
69+ java. srcDirs + = [' src/newarch' ]
70+ } else {
71+ java. srcDirs + = [' src/oldarch' ]
72+ }
73+ }
74+ }
5875}
5976
6077dependencies {
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33distributionPath =wrapper/dists
44zipStoreBase =GRADLE_USER_HOME
55zipStorePath =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