Skip to content

Commit 0ed91aa

Browse files
authored
Migrate example and dependencies to RN76 (#73)
1 parent 17660b1 commit 0ed91aa

27 files changed

+747
-413
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
9+
indent_style = space
10+
indent_size = 2
11+
12+
end_of_line = lf
13+
charset = utf-8
14+
trim_trailing_whitespace = true
15+
insert_final_newline = true

.nvmrc

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

.watchmanconfig

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

bun.lockb

58.9 KB
Binary file not shown.

example/Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ ruby '3.3.0'
55
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
66
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
77
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
8+
gem 'xcodeproj', '< 1.26.0'

example/Gemfile.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ PLATFORMS
106106
DEPENDENCIES
107107
activesupport (>= 6.1.7.5, != 7.1.0)
108108
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
109+
xcodeproj (< 1.26.0)
109110

110111
RUBY VERSION
111112
ruby 3.3.0p0

example/android/app/src/main/java/com/margelo/rnquicksqlite/example/MainApplication.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import com.facebook.react.ReactPackage
99
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1010
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1111
import com.facebook.react.defaults.DefaultReactNativeHost
12+
import com.facebook.react.soloader.OpenSourceMergedSoMapping
1213
import com.facebook.soloader.SoLoader
1314

1415
class MainApplication : Application(), ReactApplication {
@@ -34,7 +35,7 @@ class MainApplication : Application(), ReactApplication {
3435

3536
override fun onCreate() {
3637
super.onCreate()
37-
SoLoader.init(this, false)
38+
SoLoader.init(this, OpenSourceMergedSoMapping)
3839
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
3940
// If you opted-in for the New Architecture, we load the native entry point for this app.
4041
load(bridgelessEnabled=false)

example/android/build.gradle

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,43 @@
11
buildscript {
2-
ext {
3-
buildToolsVersion = "34.0.0"
4-
minSdkVersion = 23
5-
compileSdkVersion = 34
6-
targetSdkVersion = 34
7-
ndkVersion = "26.1.10909125"
8-
kotlinVersion = "1.9.24"
9-
}
10-
repositories {
11-
google()
12-
mavenCentral()
13-
}
14-
dependencies {
15-
classpath("com.android.tools.build:gradle")
16-
classpath("com.facebook.react:react-native-gradle-plugin")
17-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
2+
ext {
3+
buildToolsVersion = "35.0.0"
4+
minSdkVersion = 24
5+
compileSdkVersion = 35
6+
targetSdkVersion = 34
7+
ndkVersion = "26.1.10909125"
8+
kotlinVersion = "1.9.24"
9+
}
10+
11+
repositories {
12+
google()
13+
mavenCentral()
14+
}
15+
16+
dependencies {
17+
classpath("com.android.tools.build:gradle")
18+
classpath("com.facebook.react:react-native-gradle-plugin")
19+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
20+
}
21+
}
22+
23+
allprojects {
24+
repositories {
25+
maven {
26+
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
27+
url({
28+
def searchDir = rootDir.toPath()
29+
do {
30+
def p = searchDir.resolve("node_modules/react-native/android")
31+
if (p.toFile().exists()) {
32+
return p.toRealPath().toString()
33+
}
34+
} while (searchDir = searchDir.getParent())
35+
throw new GradleException("Could not find `react-native`");
36+
}())
1837
}
38+
mavenCentral()
39+
google()
40+
}
1941
}
2042

2143
apply plugin: "com.facebook.react.rootproject"

example/android/gradle.properties

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,27 @@
77
# For more details on how to configure your build environment visit
88
# http://www.gradle.org/docs/current/userguide/build_environment.html
99

10-
# Specifies the JVM arguments used for the daemon process.
11-
# The setting is particularly useful for tweaking memory settings.
12-
# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
13-
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
14-
15-
# When configured, Gradle will run in incubating parallel mode.
16-
# This option should only be used with decoupled projects. More details, visit
17-
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18-
# org.gradle.parallel=true
10+
# Specifies the JVM arguments used for the Gradle Daemon. The setting is
11+
# particularly useful for configuring JVM memory settings for build performance.
12+
# This does not affect the JVM settings for the Gradle client VM.
13+
# The default is `-Xmx512m -XX:MaxMetaspaceSize=256m`.
14+
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
15+
16+
# When configured, Gradle will fork up to org.gradle.workers.max JVMs to execute
17+
# projects in parallel. To learn more about parallel task execution, see the
18+
# section on Gradle build performance:
19+
# https://docs.gradle.org/current/userguide/performance.html#parallel_execution.
20+
# Default is `false`.
21+
#org.gradle.parallel=true
1922

2023
# AndroidX package structure to make it clearer which packages are bundled with the
2124
# Android operating system, and which are packaged with your app's APK
2225
# https://developer.android.com/topic/libraries/support-library/androidx-rn
2326
android.useAndroidX=true
27+
# Automatically convert third-party libraries to use AndroidX
28+
android.enableJetifier=false
29+
# Jetifier randomly fails on these libraries
30+
android.jetifier.ignorelist=hermes-android,react-android
2431

2532
# Use this property to specify which architecture you want to build.
2633
# You can also override it from the CLI using
@@ -32,8 +39,20 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
3239
# your application. You should enable this flag either if you want
3340
# to write custom TurboModules/Fabric components OR use libraries that
3441
# are providing them.
35-
newArchEnabled=false
42+
# Note that this is incompatible with web debugging.
43+
newArchEnabled=true
44+
bridgelessEnabled=true
3645

3746
# Use this property to enable or disable the Hermes JS engine.
3847
# If set to false, you will be using JSC instead.
3948
hermesEnabled=true
49+
50+
51+
# Uncomment the line below to build React Native from source.
52+
#react.buildFromSource=true
53+
54+
# Version of Android NDK to build against.
55+
#ANDROID_NDK_VERSION=26.1.10909125
56+
57+
# Version of Kotlin to build against.
58+
#KOTLIN_VERSION=1.8.22
130 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)