Skip to content

Commit 91479d0

Browse files
authored
RN 0.74.x (#69)
* chore: bump example app to RN 0.74.x * chore: bump plugin to RN 0.74.x * chore: bump peer dependency and add privacy manifest to plugin
1 parent d640a44 commit 91479d0

File tree

18 files changed

+2088
-2469
lines changed

18 files changed

+2088
-2469
lines changed

RNSketchCanvas.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Pod::Spec.new do |s|
1010
s.license = package['license']
1111
s.authors = package['author']
1212
s.source = { :git => package['repository']['url'] }
13+
s.resource_bundles = { 'RNSketchCanvas_PrivacyInfo' => 'ios/RNSketchCanvas/PrivacyInfo.xcprivacy' }
1314
s.platform = :ios, '8.0'
1415
s.source_files = 'ios/**/*.{h,m}'
1516
s.dependency 'React'

example/android/app/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ android {
112112
dependencies {
113113
// The version of react-native is set by the React Native Gradle Plugin
114114
implementation("com.facebook.react:react-android")
115-
implementation("com.facebook.react:flipper-integration")
116115
if (hermesEnabled.toBoolean()) {
117116
implementation("com.facebook.react:hermes-android")
118117
} else {

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ class MainApplication : Application(), ReactApplication {
1616

1717
override val reactNativeHost: ReactNativeHost =
1818
object : DefaultReactNativeHost(this) {
19-
override fun getPackages(): List<ReactPackage> {
20-
// Packages that cannot be autolinked yet can be added manually here, for example:
21-
// packages.add(new MyReactNativePackage());
22-
return PackageList(this).packages
23-
}
19+
override fun getPackages(): List<ReactPackage> =
20+
PackageList(this).packages.apply {
21+
// Packages that cannot be autolinked yet can be added manually here, for example:
22+
// add(MyReactNativePackage())
23+
}
2424

2525
override fun getJSMainModuleName(): String = "index"
2626

@@ -31,7 +31,8 @@ class MainApplication : Application(), ReactApplication {
3131
}
3232

3333
override val reactHost: ReactHost
34-
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
34+
get() = getDefaultReactHost(applicationContext, reactNativeHost)
35+
3536

3637
override fun onCreate() {
3738
super.onCreate()
@@ -40,6 +41,5 @@ class MainApplication : Application(), ReactApplication {
4041
// If you opted-in for the New Architecture, we load the native entry point for this app.
4142
load()
4243
}
43-
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
4444
}
4545
}

example/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ buildscript {
44
ext {
55

66
buildToolsVersion = "34.0.0"
7-
minSdkVersion = 21
7+
minSdkVersion = 23
88
compileSdkVersion = 34
99
targetSdkVersion = 34
10-
ndkVersion = "25.1.8937393"
11-
kotlinVersion = "1.8.0"
10+
ndkVersion = "26.1.10909125"
11+
kotlinVersion = "1.9.22"
1212
}
1313
repositories {
1414
google()

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

example/android/gradlew

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
145145
case $MAX_FD in #(
146146
max*)
147147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
149149
MAX_FD=$( ulimit -H -n ) ||
150150
warn "Could not query maximum file descriptor limit"
151151
esac
152152
case $MAX_FD in #(
153153
'' | soft) :;; #(
154154
*)
155155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
157157
ulimit -n "$MAX_FD" ||
158158
warn "Could not set maximum file descriptor limit to $MAX_FD"
159159
esac
@@ -202,11 +202,11 @@ fi
202202
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203203
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204204

205-
# Collect all arguments for the java command;
206-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
207-
# shell script including quotes and variable substitutions, so put them in
208-
# double quotes to make sure that they get re-expanded; and
209-
# * put everything else in single quotes, so that it's not re-expanded.
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
210210

211211
set -- \
212212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

example/android/gradlew.bat

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
4343
%JAVA_EXE% -version >NUL 2>&1
4444
if %ERRORLEVEL% equ 0 goto execute
4545

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
46+
echo. 1>&2
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48+
echo. 1>&2
49+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50+
echo location of your Java installation. 1>&2
5151

5252
goto fail
5353

@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5757

5858
if exist "%JAVA_EXE%" goto execute
5959

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
60+
echo. 1>&2
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62+
echo. 1>&2
63+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64+
echo location of your Java installation. 1>&2
6565

6666
goto fail
6767

@@ -89,4 +89,4 @@ exit /b %EXIT_CODE%
8989
:mainEnd
9090
if "%OS%"=="Windows_NT" endlocal
9191

92-
:omega
92+
:omega

example/ios/Podfile

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,7 @@ require Pod::Executable.execute_command('node', ['-p',
66
)', __dir__]).strip
77
platform :ios, min_ios_version_supported
88
prepare_react_native_project!
9-
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
10-
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
11-
#
12-
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
13-
# ```js
14-
# module.exports = {
15-
# dependencies: {
16-
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
17-
# ```
18-
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
9+
1910
linkage = ENV['USE_FRAMEWORKS']
2011
if linkage != nil
2112
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
@@ -27,11 +18,6 @@ target 'example' do
2718

2819
use_react_native!(
2920
:path => config[:reactNativePath],
30-
# Enables Flipper.
31-
#
32-
# Note that if you have use_frameworks! enabled, Flipper will not work and
33-
# you should disable the next line.
34-
:flipper_configuration => flipper_config,
3521
# An absolute path to your application root.
3622
:app_path => "#{Pod::Config.instance.installation_root}/.."
3723
)
@@ -45,7 +31,8 @@ target 'example' do
4531
react_native_post_install(
4632
installer,
4733
config[:reactNativePath],
48-
:mac_catalyst_enabled => false
34+
:mac_catalyst_enabled => false,
35+
# :ccache_enabled => true
4936
)
5037
end
5138
end

0 commit comments

Comments
 (0)