Skip to content

Commit 986b3d3

Browse files
authored
Merge pull request #4 from mCodex/feat/rn081
Upgrade React Native and update Android build configs
2 parents 8baa9d8 + a1ab845 commit 986b3d3

File tree

11 files changed

+413
-767
lines changed

11 files changed

+413
-767
lines changed

example/android/app/src/main/java/plugpagnitro/example/MainApplication.kt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ import com.facebook.react.ReactApplication
66
import com.facebook.react.ReactHost
77
import com.facebook.react.ReactNativeHost
88
import com.facebook.react.ReactPackage
9-
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
9+
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
1010
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1111
import com.facebook.react.defaults.DefaultReactNativeHost
12-
import com.facebook.react.soloader.OpenSourceMergedSoMapping
13-
import com.facebook.soloader.SoLoader
1412

1513
class MainApplication : Application(), ReactApplication {
1614

@@ -35,10 +33,7 @@ class MainApplication : Application(), ReactApplication {
3533

3634
override fun onCreate() {
3735
super.onCreate()
38-
SoLoader.init(this, OpenSourceMergedSoMapping)
39-
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
40-
// If you opted-in for the New Architecture, we load the native entry point for this app.
41-
load()
42-
}
36+
37+
loadReactNative(this)
4338
}
4439
}

example/android/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
buildscript {
22
ext {
3-
buildToolsVersion = "35.0.0"
3+
buildToolsVersion = "36.0.0"
44
minSdkVersion = 24
5-
compileSdkVersion = 35
6-
targetSdkVersion = 35
5+
compileSdkVersion = 36
6+
targetSdkVersion = 36
77
ndkVersion = "27.1.12297006"
8-
kotlinVersion = "2.0.21"
8+
kotlinVersion = "2.1.20"
99
}
1010
repositories {
1111
google()

example/android/gradle.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,8 @@ newArchEnabled=true
3737
# Use this property to enable or disable the Hermes JS engine.
3838
# If set to false, you will be using JSC instead.
3939
hermesEnabled=true
40+
41+
# Use this property to enable edge-to-edge display support.
42+
# This allows your app to draw behind system bars for an immersive UI.
43+
# Note: Only works with ReactActivity and should not be used with custom Activity.
44+
edgeToEdgeEnabled=true
59 Bytes
Binary file not shown.

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

example/android/gradlew

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
117+
CLASSPATH="\\\"\\\""
118118

119119

120120
# Determine the Java command to use to start the JVM.
@@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
213213
set -- \
214214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
215215
-classpath "$CLASSPATH" \
216-
org.gradle.wrapper.GradleWrapperMain \
216+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
217217
"$@"
218218

219219
# Stop when "xargs" is not available.

example/android/gradlew.bat

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
@REM Copyright (c) Meta Platforms, Inc. and affiliates.
2+
@REM
3+
@REM This source code is licensed under the MIT license found in the
4+
@REM LICENSE file in the root directory of this source tree.
5+
16
@rem
27
@rem Copyright 2015 the original author or authors.
38
@rem
@@ -70,11 +75,11 @@ goto fail
7075
:execute
7176
@rem Setup the command line
7277

73-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
78+
set CLASSPATH=
7479

7580

7681
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
82+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7883

7984
:end
8085
@rem End local scope for the variables with windows NT shell

example/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@
1010
"build:ios": "react-native build-ios --mode Debug"
1111
},
1212
"dependencies": {
13-
"react": "19.0.0",
14-
"react-native": "0.79.x",
15-
"react-native-nitro-modules": "^0.26.4"
13+
"react": "19.1.0",
14+
"react-native": "^0.81.0",
15+
"react-native-nitro-modules": "^0.27.6"
1616
},
1717
"devDependencies": {
1818
"@babel/core": "^7.28.0",
1919
"@babel/preset-env": "^7.28.0",
20-
"@babel/runtime": "^7.27.6",
21-
"@react-native-community/cli": "19.1.0",
22-
"@react-native-community/cli-platform-android": "18.0.0",
23-
"@react-native-community/cli-platform-ios": "18.0.0",
24-
"@react-native/babel-preset": "0.79.x",
25-
"@react-native/metro-config": "0.79.x",
26-
"@react-native/typescript-config": "0.80.1",
27-
"@types/react": "^19.1.8",
20+
"@babel/runtime": "^7.28.2",
21+
"@react-native-community/cli": "20.0.0",
22+
"@react-native-community/cli-platform-android": "20.0.0",
23+
"@react-native-community/cli-platform-ios": "20.0.0",
24+
"@react-native/babel-preset": "^0.81.0",
25+
"@react-native/metro-config": "^0.81.0",
26+
"@react-native/typescript-config": "0.81.0",
27+
"@types/react": "^19.1.10",
2828
"react-native-builder-bob": "^0.40.13",
2929
"react-native-monorepo-config": "^0.1.9"
3030
},

lefthook.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ pre-commit:
77
types:
88
glob: "*.{js,ts, jsx, tsx}"
99
run: npx tsc
10-
commit-msg:
11-
parallel: true
12-
commands:
13-
commitlint:
14-
run: npx commitlint --edit
10+
# commit-msg:
11+
# parallel: true
12+
# commands:
13+
# commitlint:
14+
# run: npx commitlint --edit

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,30 +71,30 @@
7171
},
7272
"devDependencies": {
7373
"@commitlint/config-conventional": "^19.8.1",
74-
"@eslint/compat": "^1.3.1",
74+
"@eslint/compat": "^1.3.2",
7575
"@eslint/eslintrc": "^3.3.1",
76-
"@eslint/js": "^9.31.0",
77-
"@evilmartians/lefthook": "^1.12.2",
78-
"@react-native/babel-preset": "0.80.1",
79-
"@react-native/eslint-config": "^0.80.1",
76+
"@eslint/js": "^9.33.0",
77+
"@evilmartians/lefthook": "^1.12.3",
78+
"@react-native/babel-preset": "0.81.0",
79+
"@react-native/eslint-config": "^0.81.0",
8080
"@release-it/conventional-changelog": "^10.0.1",
8181
"@types/jest": "^30.0.0",
82-
"@types/react": "^19.1.8",
82+
"@types/react": "^19.1.10",
8383
"commitlint": "^19.8.1",
8484
"del-cli": "^6.0.0",
85-
"eslint": "^9.31.0",
85+
"eslint": "^9.33.0",
8686
"eslint-config-prettier": "^10.1.8",
87-
"eslint-plugin-prettier": "^5.5.3",
87+
"eslint-plugin-prettier": "^5.5.4",
8888
"jest": "^30.0.5",
89-
"nitro-codegen": "^0.26.4",
89+
"nitro-codegen": "^0.27.6",
9090
"prettier": "^3.6.2",
91-
"react": "19.1.0",
92-
"react-native": "0.80.1",
91+
"react": "19.1.1",
92+
"react-native": "0.81.0",
9393
"react-native-builder-bob": "^0.40.13",
94-
"react-native-nitro-modules": "^0.26.4",
94+
"react-native-nitro-modules": "^0.27.6",
9595
"release-it": "^19.0.4",
9696
"turbo": "^2.5.5",
97-
"typescript": "^5.8.3"
97+
"typescript": "^5.9.2"
9898
},
9999
"peerDependencies": {
100100
"react": "*",

0 commit comments

Comments
 (0)