Skip to content

Commit 4ac24e3

Browse files
chore: example react native and libraries update
1 parent 3038e1e commit 4ac24e3

File tree

21 files changed

+2836
-1611
lines changed

21 files changed

+2836
-1611
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,5 @@ lib/
8080
.yarn/cache/*
8181
docs/.yarn
8282
.next
83-
docs/out/*
83+
docs/out/*
84+
.kotlin/

example/Gemfile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@ source 'https://rubygems.org'
33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
44
ruby ">= 2.6.10"
55

6-
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7-
# bound in the template on Cocoapods with next React Native release.
8-
gem 'cocoapods', '>= 1.13', '< 1.15'
9-
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
6+
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
7+
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
8+
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
9+
gem 'xcodeproj', '< 1.26.0'
10+
gem 'concurrent-ruby', '< 1.3.4'
11+
12+
# Ruby 3.4.0 has removed some libraries from the standard library.
13+
gem 'bigdecimal'
14+
gem 'logger'
15+
gem 'benchmark'
16+
gem 'mutex_m'

example/android/app/build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,12 @@ react {
4949
//
5050
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
5151
// hermesFlags = ["-O", "-output-source-map"]
52+
53+
autolinkLibrariesWithApp()
5254
}
5355

56+
57+
5458
/**
5559
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
5660
*/
@@ -67,7 +71,7 @@ def enableProguardInReleaseBuilds = false
6771
* give correct results when using with locales other than en-US. Note that
6872
* this variant is about 6MiB larger per architecture than default.
6973
*/
70-
def jscFlavor = 'org.webkit:android-jsc:+'
74+
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
7175

7276
android {
7377
ndkVersion rootProject.ext.ndkVersion
@@ -114,5 +118,3 @@ dependencies {
114118
implementation jscFlavor
115119
}
116120
}
117-
118-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

example/android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
android:icon="@mipmap/ic_launcher"
1010
android:roundIcon="@mipmap/ic_launcher_round"
1111
android:allowBackup="false"
12-
android:theme="@style/AppTheme">
12+
android:theme="@style/AppTheme"
13+
android:supportsRtl="true">
1314
<activity
1415
android:name=".MainActivity"
1516
android:label="@string/app_name"

example/android/app/src/main/java/fastopencv/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()

example/android/build.gradle

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

example/android/gradle.properties

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
2121
# Android operating system, and which are packaged with your app's APK
2222
# https://developer.android.com/topic/libraries/support-library/androidx-rn
2323
android.useAndroidX=true
24-
# Automatically convert third-party libraries to use AndroidX
25-
android.enableJetifier=false
2624

2725
# Use this property to specify which architecture you want to build.
2826
# You can also override it from the CLI using
@@ -34,7 +32,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
3432
# your application. You should enable this flag either if you want
3533
# to write custom TurboModules/Fabric components OR use libraries that
3634
# are providing them.
37-
newArchEnabled=false
35+
newArchEnabled=true
3836

3937
# Use this property to enable or disable the Hermes JS engine.
4038
# If set to false, you will be using JSC instead.

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.6-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

example/android/gradlew

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,7 @@ done
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
8688
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
8890

8991
# Use the maximum available, or set MAX_FD != -1 to use that value.
9092
MAX_FD=maximum
@@ -203,7 +205,7 @@ fi
203205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204206

205207
# Collect all arguments for the java command:
206-
# * 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,
207209
# and any embedded shellness will be escaped.
208210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209211
# treated as '${Hostname}' itself on the command line.
@@ -246,4 +248,4 @@ eval "set -- $(
246248
tr '\n' ' '
247249
)" '"$@"'
248250

249-
exec "$JAVACMD" "$@"
251+
exec "$JAVACMD" "$@"

example/android/settings.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
2+
plugins { id("com.facebook.react.settings") }
3+
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
14
rootProject.name = 'fastopencv.example'
25
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
36
include ':app'

0 commit comments

Comments
 (0)