Skip to content

Commit 2c68dc2

Browse files
authored
feat: update to 0.69.0 (#276)
* feat: update to 0.69.0 closes #275 * chore: update README
1 parent efd4e07 commit 2c68dc2

File tree

15 files changed

+90
-40
lines changed

15 files changed

+90
-40
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ See the below table to find out which version of the template to use.
4343

4444
| React Native | Template |
4545
| ------------ | -------- |
46+
| 0.69 | 6.11.\* |
4647
| 0.68 | 6.10.\* |
4748
| 0.67 | 6.9.\* |
4849
| 0.66 | 6.8.\* |

template/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4-
ruby '2.7.4'
4+
ruby '2.7.5'
55

66
gem 'cocoapods', '~> 1.11', '>= 1.11.2'

template/_gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23+
ios/.xcode.env.local
2324

2425
# Android/IntelliJ
2526
#
@@ -49,9 +50,10 @@ buck-out/
4950
# For more information about the recommended setup visit:
5051
# https://docs.fastlane.tools/best-practices/source-control/
5152

52-
*/fastlane/report.xml
53-
*/fastlane/Preview.html
54-
*/fastlane/screenshots
53+
**/fastlane/report.xml
54+
**/fastlane/Preview.html
55+
**/fastlane/screenshots
56+
**/fastlane/test_output
5557

5658
# Bundle artifact
5759
*.jsbundle

template/android/app/build.gradle

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
apply plugin: "com.android.application"
22

33
import com.android.build.OutputFile
4-
import org.apache.tools.ant.taskdefs.condition.Os
54

65
/**
76
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
@@ -152,17 +151,13 @@ android {
152151
"GENERATED_SRC_DIR=$buildDir/generated/source",
153152
"PROJECT_BUILD_DIR=$buildDir",
154153
"REACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
155-
"REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build"
154+
"REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
155+
"NODE_MODULES_DIR=$rootDir/../node_modules"
156156
cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
157157
cppFlags "-std=c++17"
158158
// Make sure this target name is the same you specify inside the
159159
// src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
160160
targets "helloworld_appmodules"
161-
162-
// Fix for windows limit on number of character in file paths and in command lines
163-
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
164-
arguments "NDK_APP_SHORT_COMMANDS=true"
165-
}
166161
}
167162
}
168163
if (!enableSeparateBuildPerCPUArchitecture) {
@@ -282,9 +277,10 @@ dependencies {
282277
}
283278

284279
if (enableHermes) {
285-
def hermesPath = "../../node_modules/hermes-engine/android/";
286-
debugImplementation files(hermesPath + "hermes-debug.aar")
287-
releaseImplementation files(hermesPath + "hermes-release.aar")
280+
//noinspection GradleDynamicVersion
281+
implementation("com.facebook.react:hermes-engine:+") { // From node_modules
282+
exclude group:'com.facebook.fbjni'
283+
}
288284
} else {
289285
implementation jscFlavor
290286
}
@@ -297,7 +293,11 @@ if (isNewArchitectureEnabled()) {
297293
configurations.all {
298294
resolutionStrategy.dependencySubstitution {
299295
substitute(module("com.facebook.react:react-native"))
300-
.using(project(":ReactAndroid")).because("On New Architecture we're building React Native from source")
296+
.using(project(":ReactAndroid"))
297+
.because("On New Architecture we're building React Native from source")
298+
substitute(module("com.facebook.react:hermes-engine"))
299+
.using(project(":ReactAndroid:hermes-engine"))
300+
.because("On New Architecture we're building Hermes from source")
301301
}
302302
}
303303
}

template/android/app/src/main/java/com/helloworld/MainActivity.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ protected String getMainComponentName() {
1717

1818
/**
1919
* Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and
20-
* you can specify the rendered you wish to use (Fabric or the older renderer).
20+
* you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer
21+
* (Paper).
2122
*/
2223
@Override
2324
protected ReactActivityDelegate createReactActivityDelegate() {
@@ -36,5 +37,12 @@ protected ReactRootView createRootView() {
3637
reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
3738
return reactRootView;
3839
}
40+
41+
@Override
42+
protected boolean isConcurrentRootEnabled() {
43+
// If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18).
44+
// More on this on https://reactjs.org/blog/2022/03/29/react-v18.html
45+
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
46+
}
3947
}
4048
}

template/android/app/src/main/java/com/helloworld/newarchitecture/MainApplicationReactNativeHost.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import com.facebook.react.bridge.UIManager;
1717
import com.facebook.react.fabric.ComponentFactory;
1818
import com.facebook.react.fabric.CoreComponentsRegistry;
19-
import com.facebook.react.fabric.EmptyReactNativeConfig;
2019
import com.facebook.react.fabric.FabricJSIModuleProvider;
20+
import com.facebook.react.fabric.ReactNativeConfig;
2121
import com.facebook.react.uimanager.ViewManagerRegistry;
2222
import com.helloworld.BuildConfig;
2323
import com.helloworld.newarchitecture.components.MainComponentsRegistry;
@@ -105,7 +105,7 @@ public JSIModuleProvider<UIManager> getJSIModuleProvider() {
105105
return new FabricJSIModuleProvider(
106106
reactApplicationContext,
107107
componentFactory,
108-
new EmptyReactNativeConfig(),
108+
ReactNativeConfig.DEFAULT_CONFIG,
109109
viewManagerRegistry);
110110
}
111111
});

template/android/app/src/main/jni/Android.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
1717
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
1818

1919
# If you wish to add a custom TurboModule or Fabric component in your app you
20-
# will have to uncomment those lines to include the generated source
20+
# will have to uncomment those lines to include the generated source
2121
# files from the codegen (placed in $(GENERATED_SRC_DIR)/codegen/jni)
2222
#
2323
# LOCAL_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
@@ -28,8 +28,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
2828
LOCAL_SHARED_LIBRARIES := \
2929
libfabricjni \
3030
libfbjni \
31-
libfolly_futures \
32-
libfolly_json \
31+
libfolly_runtime \
3332
libglog \
3433
libjsi \
3534
libreact_codegen_rncore \

template/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ buildscript {
2222
mavenCentral()
2323
}
2424
dependencies {
25-
classpath("com.android.tools.build:gradle:7.0.4")
25+
classpath("com.android.tools.build:gradle:7.1.1")
2626
classpath("com.facebook.react:react-native-gradle-plugin")
27-
classpath("de.undercouch:gradle-download-task:4.1.2")
27+
classpath("de.undercouch:gradle-download-task:5.0.1")
2828
// NOTE: Do not place your application dependencies here; they belong
2929
// in the individual module build.gradle files
3030
}

template/android/settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ includeBuild('../node_modules/react-native-gradle-plugin')
66
if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
77
include(":ReactAndroid")
88
project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')
9+
include(":ReactAndroid:hermes-engine")
10+
project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine')
911
}

template/ios/HelloWorld.xcodeproj/project.pbxproj

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,15 @@
256256
files = (
257257
);
258258
inputPaths = (
259+
"$(SRCROOT)/.xcode.env.local",
260+
"$(SRCROOT)/.xcode.env",
259261
);
260262
name = "Bundle React Native code and images";
261263
outputPaths = (
262264
);
263265
runOnlyForDeploymentPostprocessing = 0;
264266
shellPath = /bin/sh;
265-
shellScript = "set -e\n\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
267+
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
266268
};
267269
00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
268270
isa = PBXShellScriptBuildPhase;
@@ -436,7 +438,7 @@
436438
"$(inherited)",
437439
);
438440
INFOPLIST_FILE = HelloWorldTests/Info.plist;
439-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
441+
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
440442
LD_RUNPATH_SEARCH_PATHS = (
441443
"$(inherited)",
442444
"@executable_path/Frameworks",
@@ -460,7 +462,7 @@
460462
BUNDLE_LOADER = "$(TEST_HOST)";
461463
COPY_PHASE_STRIP = NO;
462464
INFOPLIST_FILE = HelloWorldTests/Info.plist;
463-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
465+
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
464466
LD_RUNPATH_SEARCH_PATHS = (
465467
"$(inherited)",
466468
"@executable_path/Frameworks",
@@ -576,7 +578,7 @@
576578
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
577579
GCC_WARN_UNUSED_FUNCTION = YES;
578580
GCC_WARN_UNUSED_VARIABLE = YES;
579-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
581+
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
580582
LD_RUNPATH_SEARCH_PATHS = (
581583
/usr/lib/swift,
582584
"$(inherited)",
@@ -640,7 +642,7 @@
640642
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
641643
GCC_WARN_UNUSED_FUNCTION = YES;
642644
GCC_WARN_UNUSED_VARIABLE = YES;
643-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
645+
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
644646
LD_RUNPATH_SEARCH_PATHS = (
645647
/usr/lib/swift,
646648
"$(inherited)",

0 commit comments

Comments
 (0)