-
-
Save Kudo/417a5159cb01a400ecee22ad4985d287 to your computer and use it in GitHub Desktop.
fabric-tester 0.71 patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/apps/fabric-tester/android/app/build.gradle b/apps/fabric-tester/android/app/build.gradle | |
index 5c88800059..6b025c1bf0 100644 | |
--- a/apps/fabric-tester/android/app/build.gradle | |
+++ b/apps/fabric-tester/android/app/build.gradle | |
@@ -1,113 +1,81 @@ | |
apply plugin: "com.android.application" | |
+apply plugin: "com.facebook.react" | |
import com.android.build.OutputFile | |
-/** | |
- * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets | |
- * and bundleReleaseJsAndAssets). | |
- * These basically call `react-native bundle` with the correct arguments during the Android build | |
- * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the | |
- * bundle directly from the development server. Below you can see all the possible configurations | |
- * and their defaults. If you decide to add a configuration block, make sure to add it before the | |
- * `apply from: "../../node_modules/react-native/react.gradle"` line. | |
- * | |
- * project.ext.react = [ | |
- * // the name of the generated asset file containing your JS bundle | |
- * bundleAssetName: "index.android.bundle", | |
- * | |
- * // the entry file for bundle generation. If none specified and | |
- * // "index.android.js" exists, it will be used. Otherwise "index.js" is | |
- * // default. Can be overridden with ENTRY_FILE environment variable. | |
- * entryFile: "index.android.js", | |
- * | |
- * // https://reactnative.dev/docs/performance#enable-the-ram-format | |
- * bundleCommand: "ram-bundle", | |
- * | |
- * // whether to bundle JS and assets in debug mode | |
- * bundleInDebug: false, | |
- * | |
- * // whether to bundle JS and assets in release mode | |
- * bundleInRelease: true, | |
- * | |
- * // whether to bundle JS and assets in another build variant (if configured). | |
- * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants | |
- * // The configuration property can be in the following formats | |
- * // 'bundleIn${productFlavor}${buildType}' | |
- * // 'bundleIn${buildType}' | |
- * // bundleInFreeDebug: true, | |
- * // bundleInPaidRelease: true, | |
- * // bundleInBeta: true, | |
- * | |
- * // whether to disable dev mode in custom build variants (by default only disabled in release) | |
- * // for example: to disable dev mode in the staging build type (if configured) | |
- * devDisabledInStaging: true, | |
- * // The configuration property can be in the following formats | |
- * // 'devDisabledIn${productFlavor}${buildType}' | |
- * // 'devDisabledIn${buildType}' | |
- * | |
- * // the root of your project, i.e. where "package.json" lives | |
- * root: "../../", | |
- * | |
- * // where to put the JS bundle asset in debug mode | |
- * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", | |
- * | |
- * // where to put the JS bundle asset in release mode | |
- * jsBundleDirRelease: "$buildDir/intermediates/assets/release", | |
- * | |
- * // where to put drawable resources / React Native assets, e.g. the ones you use via | |
- * // require('./image.png')), in debug mode | |
- * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", | |
- * | |
- * // where to put drawable resources / React Native assets, e.g. the ones you use via | |
- * // require('./image.png')), in release mode | |
- * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", | |
- * | |
- * // by default the gradle tasks are skipped if none of the JS files or assets change; this means | |
- * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to | |
- * // date; if you have any other folders that you want to ignore for performance reasons (gradle | |
- * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ | |
- * // for example, you might want to remove it from here. | |
- * inputExcludes: ["android/**", "ios/**"], | |
- * | |
- * // override which node gets called and with what additional arguments | |
- * nodeExecutableAndArgs: ["node"], | |
- * | |
- * // supply additional arguments to the packager | |
- * extraPackagerArgs: [] | |
- * ] | |
- */ | |
- | |
def projectRoot = rootDir.getAbsoluteFile().getParentFile().getAbsolutePath() | |
-def reactNativeRoot = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() | |
- | |
-project.ext.react = [ | |
- entryFile: ["node", "-e", "require('expo/scripts/resolveAppEntry')", projectRoot, "android"].execute(null, rootDir).text.trim(), | |
- enableHermes: (findProperty('expo.jsEngine') ?: "jsc") == "hermes", | |
- hermesCommand: new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc", | |
- cliPath: "${reactNativeRoot}/cli.js", | |
- composeSourceMapsPath: "${reactNativeRoot}/scripts/compose-source-maps.js", | |
-] | |
+/** | |
+ * This is the configuration block to customize your React Native Android app. | |
+ * By default you don't need to apply any configuration, just uncomment the lines you need. | |
+ */ | |
+react { | |
+ entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", projectRoot, "android"].execute(null, rootDir).text.trim()) | |
+ reactNativeDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile() | |
+ hermesCommand = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc" | |
+ | |
+ /* Folders */ | |
+ // The root of your project, i.e. where "package.json" lives. Default is '..' | |
+ // root = file("../") | |
+ // The folder where the react-native NPM package is. Default is ../node_modules/react-native | |
+ // reactNativeDir = file("../node-modules/react-native") | |
+ // The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen | |
+ // codegenDir = file("../node-modules/react-native-codegen") | |
+ // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js | |
+ // cliFile = file("../node_modules/react-native/cli.js") | |
+ | |
+ /* Variants */ | |
+ // The list of variants to that are debuggable. For those we're going to | |
+ // skip the bundling of the JS bundle and the assets. By default is just 'debug'. | |
+ // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. | |
+ // debuggableVariants = ["liteDebug", "prodDebug"] | |
+ | |
+ /* Bundling */ | |
+ // A list containing the node command and its flags. Default is just 'node'. | |
+ // nodeExecutableAndArgs = ["node"] | |
+ // | |
+ // The command to run when bundling. By default is 'bundle' | |
+ // bundleCommand = "ram-bundle" | |
+ // | |
+ // The path to the CLI configuration file. Default is empty. | |
+ // bundleConfig = file(../rn-cli.config.js) | |
+ // | |
+ // The name of the generated asset file containing your JS bundle | |
+ // bundleAssetName = "MyApplication.android.bundle" | |
+ // | |
+ // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' | |
+ // entryFile = file("../js/MyApplication.android.js") | |
+ // | |
+ // A list of extra flags to pass to the 'bundle' commands. | |
+ // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle | |
+ // extraPackagerArgs = [] | |
+ | |
+ /* Hermes Commands */ | |
+ // The hermes compiler command to run. By default it is 'hermesc' | |
+ // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" | |
+ // | |
+ // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" | |
+ // hermesFlags = ["-O", "-output-source-map"] | |
+} | |
-apply from: new File(reactNativeRoot, "react.gradle") | |
+// Override `hermesEnabled` by `expo.jsEngine` | |
+project.setProperty('hermesEnabled', (findProperty('expo.jsEngine') ?: "jsc") == "hermes") | |
/** | |
- * Set this to true to create two separate APKs instead of one: | |
- * - An APK that only works on ARM devices | |
- * - An APK that only works on x86 devices | |
- * The advantage is the size of the APK is reduced by about 4MB. | |
- * Upload all the APKs to the Play Store and people will download | |
- * the correct one based on the CPU architecture of their device. | |
+ * Set this to true to create four separate APKs instead of one, | |
+ * one for each native architecture. This is useful if you don't | |
+ * use App Bundles (https://developer.android.com/guide/app-bundle/) | |
+ * and want to have separate APKs to upload to the Play Store. | |
*/ | |
def enableSeparateBuildPerCPUArchitecture = false | |
/** | |
- * Run Proguard to shrink the Java bytecode in release builds. | |
+ * Set this to true to Run Proguard on Release builds to minify the Java bytecode. | |
*/ | |
-def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInReleaseBuilds') ?: false).toBoolean() | |
+def enableProguardInReleaseBuilds = false | |
/** | |
- * The preferred build flavor of JavaScriptCore. | |
+ * The preferred build flavor of JavaScriptCore (JSC) | |
* | |
* For example, to use the international variant, you can use: | |
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'` | |
@@ -120,16 +88,9 @@ def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInRelea | |
def jscFlavor = 'org.webkit:android-jsc:+' | |
/** | |
- * Whether to enable the Hermes VM. | |
- * | |
- * This should be set on project.ext.react and that value will be read here. If it is not set | |
- * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode | |
- * and the benefits of using Hermes will therefore be sharply reduced. | |
- */ | |
-def enableHermes = project.ext.react.get("enableHermes", false); | |
- | |
-/** | |
- * Architectures to build native code for. | |
+ * Private function to get the list of Native Architectures you want to build. | |
+ * This reads the value from reactNativeArchitectures in your gradle.properties | |
+ * file and works together with the --active-arch-only flag of react-native run-android. | |
*/ | |
def reactNativeArchitectures() { | |
def value = project.getProperties().get("reactNativeArchitectures") | |
@@ -147,66 +108,6 @@ android { | |
targetSdkVersion rootProject.ext.targetSdkVersion | |
versionCode 1 | |
versionName "1.0.0" | |
- buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() | |
- | |
- if (isNewArchitectureEnabled()) { | |
- // We configure the CMake build only if you decide to opt-in for the New Architecture. | |
- externalNativeBuild { | |
- cmake { | |
- arguments "-DPROJECT_BUILD_DIR=$buildDir", | |
- "-DREACT_ANDROID_DIR=${reactNativeRoot}/ReactAndroid", | |
- "-DREACT_ANDROID_BUILD_DIR=${reactNativeRoot}/ReactAndroid/build", | |
- "-DNODE_MODULES_DIR=$rootDir/../node_modules", | |
- "-DANDROID_STL=c++_shared" | |
- } | |
- } | |
- if (!enableSeparateBuildPerCPUArchitecture) { | |
- ndk { | |
- abiFilters (*reactNativeArchitectures()) | |
- } | |
- } | |
- } | |
- } | |
- | |
- if (isNewArchitectureEnabled()) { | |
- // We configure the CMake build only if you decide to opt-in for the New Architecture. | |
- externalNativeBuild { | |
- cmake { | |
- path "$projectDir/src/main/jni/CMakeLists.txt" | |
- } | |
- } | |
- def reactAndroidProjectDir = project(':ReactAndroid').projectDir | |
- def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) { | |
- dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck") | |
- from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") | |
- into("$buildDir/react-ndk/exported") | |
- } | |
- def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) { | |
- dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck") | |
- from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") | |
- into("$buildDir/react-ndk/exported") | |
- } | |
- afterEvaluate { | |
- // If you wish to add a custom TurboModule or component locally, | |
- // you should uncomment this line. | |
- // preBuild.dependsOn("generateCodegenArtifactsFromSchema") | |
- preDebugBuild.dependsOn(packageReactNdkDebugLibs) | |
- preReleaseBuild.dependsOn(packageReactNdkReleaseLibs) | |
- | |
- // Due to a bug inside AGP, we have to explicitly set a dependency | |
- // between configureCMakeDebug* tasks and the preBuild tasks. | |
- // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732 | |
- configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild) | |
- configureCMakeDebug.dependsOn(preDebugBuild) | |
- reactNativeArchitectures().each { architecture -> | |
- tasks.findByName("configureCMakeDebug[${architecture}]")?.configure { | |
- dependsOn("preDebugBuild") | |
- } | |
- tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure { | |
- dependsOn("preReleaseBuild") | |
- } | |
- } | |
- } | |
} | |
splits { | |
@@ -275,11 +176,18 @@ android { | |
} | |
dependencies { | |
- implementation fileTree(dir: "libs", include: ["*.jar"]) | |
- | |
//noinspection GradleDynamicVersion | |
implementation "com.facebook.react:react-native:+" // From node_modules | |
+ // The version of react-native is set by the React Native Gradle Plugin | |
+ implementation("com.facebook.react:react-android") | |
+ | |
+ if (hermesEnabled.toBoolean()) { | |
+ implementation("com.facebook.react:hermes-android") | |
+ } else { | |
+ implementation jscFlavor | |
+ } | |
+ | |
def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true"; | |
def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true"; | |
def isWebpAnimatedEnabled = (findProperty('expo.webp.animated') ?: "") == "true"; | |
@@ -306,57 +214,14 @@ dependencies { | |
} | |
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" | |
- debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { | |
- exclude group:'com.facebook.fbjni' | |
- } | |
+ | |
+ // Flipper | |
+ debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") | |
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { | |
- exclude group:'com.facebook.flipper' | |
exclude group:'com.squareup.okhttp3', module:'okhttp' | |
} | |
- debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { | |
- exclude group:'com.facebook.flipper' | |
- } | |
- | |
- if (enableHermes) { | |
- //noinspection GradleDynamicVersion | |
- implementation("com.facebook.react:hermes-engine:+") { // From node_modules | |
- exclude group:'com.facebook.fbjni' | |
- } | |
- } else { | |
- implementation jscFlavor | |
- } | |
-} | |
- | |
-if (isNewArchitectureEnabled()) { | |
- // If new architecture is enabled, we let you build RN from source | |
- // Otherwise we fallback to a prebuilt .aar bundled in the NPM package. | |
- // This will be applied to all the imported transtitive dependency. | |
- configurations.all { | |
- resolutionStrategy.dependencySubstitution { | |
- substitute(module("com.facebook.react:react-native")) | |
- .using(project(":ReactAndroid")) | |
- .because("On New Architecture we're building React Native from source") | |
- substitute(module("com.facebook.react:hermes-engine")) | |
- .using(project(":ReactAndroid:hermes-engine")) | |
- .because("On New Architecture we're building Hermes from source") | |
- } | |
- } | |
-} | |
- | |
-// Run this once to be able to run the application with BUCK | |
-// puts all compile dependencies into folder libs for BUCK to use | |
-task copyDownloadableDepsToLibs(type: Copy) { | |
- from configurations.implementation | |
- into 'libs' | |
+ debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") | |
} | |
apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle"); | |
applyNativeModulesAppBuildGradle(project) | |
- | |
-def isNewArchitectureEnabled() { | |
- // To opt-in for the New Architecture, you can either: | |
- // - Set `newArchEnabled` to true inside the `gradle.properties` file | |
- // - Invoke gradle with `-newArchEnabled=true` | |
- // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true` | |
- return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true" | |
-} | |
diff --git a/apps/fabric-tester/android/app/src/main/java/com/community/fabrictester/MainActivity.java b/apps/fabric-tester/android/app/src/main/java/com/community/fabrictester/MainActivity.java | |
index cd83fdc89b..36beaf222c 100644 | |
--- a/apps/fabric-tester/android/app/src/main/java/com/community/fabrictester/MainActivity.java | |
+++ b/apps/fabric-tester/android/app/src/main/java/com/community/fabrictester/MainActivity.java | |
@@ -6,6 +6,8 @@ import android.os.Bundle; | |
import com.facebook.react.ReactActivity; | |
import com.facebook.react.ReactActivityDelegate; | |
import com.facebook.react.ReactRootView; | |
+import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; | |
+import com.facebook.react.defaults.DefaultReactActivityDelegate; | |
import expo.modules.ReactActivityDelegateWrapper; | |
@@ -36,7 +38,14 @@ public class MainActivity extends ReactActivity { | |
@Override | |
protected ReactActivityDelegate createReactActivityDelegate() { | |
return new ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, | |
- new MainActivityDelegate(this, getMainComponentName()) | |
+ new DefaultReactActivityDelegate( | |
+ this, | |
+ getMainComponentName(), | |
+ // If you opted-in for the New Architecture, we enable the Fabric Renderer. | |
+ DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled | |
+ // If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18). | |
+ DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled | |
+ ) | |
); | |
} | |
diff --git a/apps/fabric-tester/android/app/src/main/java/com/community/fabrictester/MainApplication.java b/apps/fabric-tester/android/app/src/main/java/com/community/fabrictester/MainApplication.java | |
index 629030f90f..092bef5972 100644 | |
--- a/apps/fabric-tester/android/app/src/main/java/com/community/fabrictester/MainApplication.java | |
+++ b/apps/fabric-tester/android/app/src/main/java/com/community/fabrictester/MainApplication.java | |
@@ -12,7 +12,8 @@ import com.facebook.react.ReactNativeHost; | |
import com.facebook.react.ReactPackage; | |
import com.facebook.react.config.ReactFeatureFlags; | |
import com.facebook.soloader.SoLoader; | |
-import com.community.fabrictester.newarchitecture.MainApplicationReactNativeHost; | |
+import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; | |
+import com.facebook.react.defaults.DefaultReactNativeHost; | |
import expo.modules.ApplicationLifecycleDispatcher; | |
import expo.modules.ReactNativeHostWrapper; | |
@@ -23,7 +24,7 @@ import java.util.List; | |
public class MainApplication extends Application implements ReactApplication { | |
private final ReactNativeHost mReactNativeHost = new ReactNativeHostWrapper( | |
this, | |
- new ReactNativeHost(this) { | |
+ new DefaultReactNativeHost(this) { | |
@Override | |
public boolean getUseDeveloperSupport() { | |
return BuildConfig.DEBUG; | |
@@ -42,18 +43,20 @@ public class MainApplication extends Application implements ReactApplication { | |
protected String getJSMainModuleName() { | |
return "index"; | |
} | |
- }); | |
- private final ReactNativeHost mNewArchitectureNativeHost = | |
- new ReactNativeHostWrapper(this, new MainApplicationReactNativeHost(this)); | |
+ @Override | |
+ protected boolean isNewArchEnabled() { | |
+ return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; | |
+ } | |
+ @Override | |
+ protected Boolean isHermesEnabled() { | |
+ return BuildConfig.IS_HERMES_ENABLED; | |
+ } | |
+ }); | |
@Override | |
public ReactNativeHost getReactNativeHost() { | |
- if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { | |
- return mNewArchitectureNativeHost; | |
- } else { | |
- return mReactNativeHost; | |
- } | |
+ return mReactNativeHost; | |
} | |
@Override | |
@@ -63,6 +66,10 @@ public class MainApplication extends Application implements ReactApplication { | |
ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; | |
SoLoader.init(this, /* native exopackage */ false); | |
+ if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { | |
+ // If you opted-in for the New Architecture, we load the native entry point for this app. | |
+ DefaultNewArchitectureEntryPoint.load(); | |
+ } | |
initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); | |
ApplicationLifecycleDispatcher.onApplicationCreate(this); | |
} | |
diff --git a/apps/fabric-tester/android/build.gradle b/apps/fabric-tester/android/build.gradle | |
index 37170ce01d..4d9166fb5f 100644 | |
--- a/apps/fabric-tester/android/build.gradle | |
+++ b/apps/fabric-tester/android/build.gradle | |
@@ -2,29 +2,24 @@ | |
buildscript { | |
ext { | |
- buildToolsVersion = findProperty('android.buildToolsVersion') ?: '31.0.0' | |
+ buildToolsVersion = findProperty('android.buildToolsVersion') ?: '33.0.0' | |
minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '21') | |
- compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '31') | |
- targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '31') | |
+ compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '33') | |
+ targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '33') | |
if (findProperty('android.kotlinVersion')) { | |
kotlinVersion = findProperty('android.kotlinVersion') | |
} | |
frescoVersion = findProperty('expo.frescoVersion') ?: '2.5.0' | |
- if (System.properties['os.arch'] == 'aarch64') { | |
- // For M1 Users we need to use the NDK 24 which added support for aarch64 | |
- ndkVersion = '24.0.8215888' | |
- } else { | |
- // Otherwise we default to the side-by-side NDK version from AGP. | |
- ndkVersion = '21.4.7075529' | |
- } | |
+ // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. | |
+ ndkVersion = "23.1.7779620" | |
} | |
repositories { | |
google() | |
mavenCentral() | |
} | |
dependencies { | |
- classpath('com.android.tools.build:gradle:7.2.1') | |
+ classpath("com.android.tools.build:gradle:7.4.0-beta05") | |
classpath('com.facebook.react:react-native-gradle-plugin') | |
classpath('de.undercouch:gradle-download-task:5.0.1') | |
// NOTE: Do not place your application dependencies here; they belong | |
@@ -45,13 +40,7 @@ allprojects { | |
} | |
google() | |
- mavenCentral { | |
- // We don't want to fetch react-native from Maven Central as there are | |
- // older versions over there. | |
- content { | |
- excludeGroup 'com.facebook.react' | |
- } | |
- } | |
+ mavenCentral() | |
maven { url 'https://www.jitpack.io' } | |
maven { | |
diff --git a/apps/fabric-tester/android/gradle.properties b/apps/fabric-tester/android/gradle.properties | |
index 1b7b700f9a..a0b924ab44 100644 | |
--- a/apps/fabric-tester/android/gradle.properties | |
+++ b/apps/fabric-tester/android/gradle.properties | |
@@ -42,7 +42,11 @@ newArchEnabled=true | |
# The hosted JavaScript engine | |
# Supported values: expo.jsEngine = "hermes" | "jsc" | |
-expo.jsEngine=jsc | |
+expo.jsEngine=hermes | |
+ | |
+# Use this property to enable or disable the Hermes JS engine. | |
+# If set to false, you will be using JSC instead. | |
+hermesEnabled=true | |
# Enable GIF support in React Native images (~200 B increase) | |
expo.gif.enabled=true | |
diff --git a/apps/fabric-tester/android/settings.gradle b/apps/fabric-tester/android/settings.gradle | |
index 5f20399687..3c6aff9b71 100644 | |
--- a/apps/fabric-tester/android/settings.gradle | |
+++ b/apps/fabric-tester/android/settings.gradle | |
@@ -7,11 +7,4 @@ apply from: new File(["node", "--print", "require.resolve('@react-native-communi | |
applyNativeModulesSettingsGradle(settings) | |
include ':app' | |
-includeBuild(new File(["node", "--print", "require.resolve('react-native-gradle-plugin/package.json')"].execute(null, rootDir).text.trim()).getParentFile()) | |
- | |
-if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") { | |
- include(":ReactAndroid") | |
- project(":ReactAndroid").projectDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../ReactAndroid"); | |
- include(":ReactAndroid:hermes-engine") | |
- project(":ReactAndroid:hermes-engine").projectDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../ReactAndroid/hermes-engine"); | |
-} | |
+includeBuild(new File(["node", "--print", "require.resolve('@react-native/gradle-plugin/package.json')"].execute(null, rootDir).text.trim()).getParentFile()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment