Skip to content

Commit 728e8a0

Browse files
committed
chore: upgrade example app
1 parent 56a9b30 commit 728e8a0

File tree

21 files changed

+755
-566
lines changed

21 files changed

+755
-566
lines changed

example/.watchmanconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

example/Gemfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,10 @@ ruby ">= 2.6.10"
2121
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
2222
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
2323
gem 'xcodeproj', '< 1.26.0'
24+
gem 'concurrent-ruby', '< 1.3.4'
25+
26+
# Ruby 3.4.0 has removed some libraries from the standard library.
27+
gem 'bigdecimal'
28+
gem 'logger'
29+
gem 'benchmark'
30+
gem 'mutex_m'

example/Gemfile.lock

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.7)
5+
base64
6+
nkf
7+
rexml
8+
activesupport (7.2.2.2)
9+
base64
10+
benchmark (>= 0.3)
11+
bigdecimal
12+
concurrent-ruby (~> 1.0, >= 1.3.1)
13+
connection_pool (>= 2.2.5)
14+
drb
15+
i18n (>= 1.6, < 2)
16+
logger (>= 1.4.2)
17+
minitest (>= 5.1)
18+
securerandom (>= 0.3)
19+
tzinfo (~> 2.0, >= 2.0.5)
20+
addressable (2.8.7)
21+
public_suffix (>= 2.0.2, < 7.0)
22+
algoliasearch (1.27.5)
23+
httpclient (~> 2.8, >= 2.8.3)
24+
json (>= 1.5.1)
25+
atomos (0.1.3)
26+
base64 (0.3.0)
27+
benchmark (0.4.1)
28+
bigdecimal (3.2.2)
29+
claide (1.1.0)
30+
cocoapods (1.15.2)
31+
addressable (~> 2.8)
32+
claide (>= 1.0.2, < 2.0)
33+
cocoapods-core (= 1.15.2)
34+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
35+
cocoapods-downloader (>= 2.1, < 3.0)
36+
cocoapods-plugins (>= 1.0.0, < 2.0)
37+
cocoapods-search (>= 1.0.0, < 2.0)
38+
cocoapods-trunk (>= 1.6.0, < 2.0)
39+
cocoapods-try (>= 1.1.0, < 2.0)
40+
colored2 (~> 3.1)
41+
escape (~> 0.0.4)
42+
fourflusher (>= 2.3.0, < 3.0)
43+
gh_inspector (~> 1.0)
44+
molinillo (~> 0.8.0)
45+
nap (~> 1.0)
46+
ruby-macho (>= 2.3.0, < 3.0)
47+
xcodeproj (>= 1.23.0, < 2.0)
48+
cocoapods-core (1.15.2)
49+
activesupport (>= 5.0, < 8)
50+
addressable (~> 2.8)
51+
algoliasearch (~> 1.0)
52+
concurrent-ruby (~> 1.1)
53+
fuzzy_match (~> 2.0.4)
54+
nap (~> 1.0)
55+
netrc (~> 0.11)
56+
public_suffix (~> 4.0)
57+
typhoeus (~> 1.0)
58+
cocoapods-deintegrate (1.0.5)
59+
cocoapods-downloader (2.1)
60+
cocoapods-plugins (1.0.0)
61+
nap
62+
cocoapods-search (1.0.1)
63+
cocoapods-trunk (1.6.0)
64+
nap (>= 0.8, < 2.0)
65+
netrc (~> 0.11)
66+
cocoapods-try (1.2.0)
67+
colored2 (3.1.2)
68+
concurrent-ruby (1.3.3)
69+
connection_pool (2.5.3)
70+
drb (2.2.3)
71+
escape (0.0.4)
72+
ethon (0.15.0)
73+
ffi (>= 1.15.0)
74+
ffi (1.17.2)
75+
fourflusher (2.3.1)
76+
fuzzy_match (2.0.4)
77+
gh_inspector (1.1.3)
78+
httpclient (2.9.0)
79+
mutex_m
80+
i18n (1.14.7)
81+
concurrent-ruby (~> 1.0)
82+
json (2.13.2)
83+
logger (1.7.0)
84+
minitest (5.25.5)
85+
molinillo (0.8.0)
86+
mutex_m (0.3.0)
87+
nanaimo (0.3.0)
88+
nap (1.1.0)
89+
netrc (0.11.0)
90+
nkf (0.2.0)
91+
public_suffix (4.0.7)
92+
rexml (3.4.2)
93+
ruby-macho (2.5.1)
94+
securerandom (0.4.1)
95+
typhoeus (1.5.0)
96+
ethon (>= 0.9.0, < 0.16.0)
97+
tzinfo (2.0.6)
98+
concurrent-ruby (~> 1.0)
99+
xcodeproj (1.25.1)
100+
CFPropertyList (>= 2.3.3, < 4.0)
101+
atomos (~> 0.1.3)
102+
claide (>= 1.0.2, < 2.0)
103+
colored2 (~> 3.1)
104+
nanaimo (~> 0.3.0)
105+
rexml (>= 3.3.6, < 4.0)
106+
107+
PLATFORMS
108+
ruby
109+
110+
DEPENDENCIES
111+
activesupport (>= 6.1.7.5, != 7.1.0)
112+
benchmark
113+
bigdecimal
114+
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
115+
concurrent-ruby (< 1.3.4)
116+
logger
117+
mutex_m
118+
xcodeproj (< 1.26.0)
119+
120+
RUBY VERSION
121+
ruby 3.2.2p53
122+
123+
BUNDLED WITH
124+
2.4.10

example/android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ def enableProguardInReleaseBuilds = true
8080
* The preferred build flavor of JavaScriptCore (JSC)
8181
*
8282
* For example, to use the international variant, you can use:
83-
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
83+
* `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`
8484
*
8585
* The international variant includes ICU i18n library and necessary data
8686
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
8787
* give correct results when using with locales other than en-US. Note that
8888
* this variant is about 6MiB larger per architecture than default.
8989
*/
90-
def jscFlavor = 'org.webkit:android-jsc:+'
90+
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
9191

9292
android {
9393
ndkVersion rootProject.ext.ndkVersion

example/android/app/src/main/java/com/sampleapp/MainApplication.java

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,10 @@
2020
import androidx.annotation.NonNull;
2121
import com.facebook.react.PackageList;
2222
import com.facebook.react.ReactApplication;
23+
import com.facebook.react.ReactNativeApplicationEntryPoint;
2324
import com.facebook.react.ReactNativeHost;
2425
import com.facebook.react.ReactPackage;
25-
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
2626
import com.facebook.react.defaults.DefaultReactNativeHost;
27-
import com.facebook.react.soloader.OpenSourceMergedSoMapping;
28-
import com.facebook.soloader.SoLoader;
29-
import java.io.IOException;
3027
import java.util.List;
3128

3229
public class MainApplication extends Application implements ReactApplication {
@@ -38,6 +35,7 @@ public boolean getUseDeveloperSupport() {
3835
return BuildConfig.DEBUG;
3936
}
4037

38+
@NonNull
4139
@Override
4240
protected List<ReactPackage> getPackages() {
4341
@SuppressWarnings("UnnecessaryLocalVariable")
@@ -47,6 +45,7 @@ protected List<ReactPackage> getPackages() {
4745
return packages;
4846
}
4947

48+
@NonNull
5049
@Override
5150
protected String getJSMainModuleName() {
5251
return "index";
@@ -56,11 +55,6 @@ protected String getJSMainModuleName() {
5655
protected boolean isNewArchEnabled() {
5756
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
5857
}
59-
60-
@Override
61-
protected Boolean isHermesEnabled() {
62-
return BuildConfig.IS_HERMES_ENABLED;
63-
}
6458
};
6559

6660
@NonNull
@@ -72,14 +66,6 @@ public ReactNativeHost getReactNativeHost() {
7266
@Override
7367
public void onCreate() {
7468
super.onCreate();
75-
try {
76-
SoLoader.init(this, OpenSourceMergedSoMapping.INSTANCE);
77-
} catch (IOException e) {
78-
throw new RuntimeException(e);
79-
}
80-
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
81-
// If you opted-in for the New Architecture, we load the native entry point for this app.
82-
DefaultNewArchitectureEntryPoint.load();
83-
}
69+
ReactNativeApplicationEntryPoint.loadReactNative(this);
8470
}
8571
}

example/android/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ def enableDesugaring = true
2020

2121
buildscript {
2222
ext {
23-
buildToolsVersion = "35.0.0"
23+
buildToolsVersion = "36.0.0"
2424
minSdkVersion = 34
25-
compileSdkVersion = 35
26-
targetSdkVersion = 34
27-
ndkVersion = "26.1.10909125"
25+
compileSdkVersion = 36
26+
targetSdkVersion = 36
27+
ndkVersion = "27.1.12297006"
2828
}
2929
repositories {
3030
google()
3131
mavenCentral()
3232
}
3333
dependencies {
34-
classpath('com.android.tools.build:gradle:8.6.1')
34+
classpath("com.android.tools.build:gradle")
3535
classpath("com.facebook.react:react-native-gradle-plugin")
3636
classpath("com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1")
3737
}

example/android/gradle.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,8 @@ newArchEnabled=false
4444
# Use this property to enable or disable the Hermes JS engine.
4545
# If set to false, you will be using JSC instead.
4646
hermesEnabled=true
47+
48+
# Use this property to enable edge-to-edge display support.
49+
# This allows your app to draw behind system bars for an immersive UI.
50+
# Note: Only works with ReactActivity and should not be used with custom Activity.
51+
edgeToEdgeEnabled=false
-17.4 KB
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.11-all.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: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
#
5959
# (3) This script is generated from the Groovy template
6060
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
61-
# within the Gradle project
61+
# within the Gradle project.
6262
#
6363
# You can find Gradle at https://github.com/gradle/gradle/.
6464
#
@@ -86,8 +86,7 @@ done
8686
# shellcheck disable=SC2034
8787
APP_BASE_NAME=${0##*/}
8888
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89-
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90-
' "$PWD" ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
9190

9291
# Use the maximum available, or set MAX_FD != -1 to use that value.
9392
MAX_FD=maximum
@@ -115,7 +114,7 @@ case "$( uname )" in #(
115114
NONSTOP* ) nonstop=true ;;
116115
esac
117116

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

120119

121120
# Determine the Java command to use to start the JVM.
@@ -206,15 +205,15 @@ fi
206205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
207206

208207
# Collect all arguments for the java command:
209-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
210209
# and any embedded shellness will be escaped.
211210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
212211
# treated as '${Hostname}' itself on the command line.
213212

214213
set -- \
215214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
216215
-classpath "$CLASSPATH" \
217-
org.gradle.wrapper.GradleWrapperMain \
216+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
218217
"$@"
219218

220219
# Stop when "xargs" is not available.

0 commit comments

Comments
 (0)