Skip to content

Commit 1dc27ad

Browse files
authored
chore: upgade example to rn 0.82.0 (#4033)
* chore: upgade example to rn 0.82.0 * fix main application * update yarn.lock after rebase
1 parent 2a4df21 commit 1dc27ad

10 files changed

Lines changed: 1219 additions & 416 deletions

File tree

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

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,17 @@ import com.facebook.react.ReactPackage
99
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1010
import com.facebook.react.defaults.DefaultReactNativeHost
1111
class MainApplication : Application(), ReactApplication {
12-
override val reactNativeHost: ReactNativeHost =
13-
object : DefaultReactNativeHost(this) {
14-
override fun getPackages(): List<ReactPackage> =
15-
PackageList(this).packages.apply {
16-
// Packages that cannot be autolinked yet can be added manually here, for example:
17-
// add(MyReactNativePackage())
18-
}
19-
override fun getJSMainModuleName(): String = "index"
20-
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
21-
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
22-
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
23-
}
24-
override val reactHost: ReactHost
25-
get() = getDefaultReactHost(applicationContext, reactNativeHost)
12+
override val reactHost: ReactHost by lazy {
13+
getDefaultReactHost(
14+
context = applicationContext,
15+
packageList =
16+
PackageList(this).packages.apply {
17+
// Packages that cannot be autolinked yet can be added manually here, for example: // Packages that cannot be autolinked yet can be added manually here, for example:
18+
// add(MyReactNativePackage())
19+
},
20+
)
21+
}
22+
2623
override fun onCreate() {
2724
super.onCreate()
2825
loadReactNative(this)

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

example/android/gradlew

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/babel.config.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,11 @@ module.exports = getConfig(
1010
{
1111
presets: ['babel-preset-expo'],
1212
plugins: [
13+
'react-native-reanimated/plugin',
1314
[
1415
'babel-plugin-react-compiler',
1516
{
16-
// Log what the compiler is doing (set to false to disable logging)
17-
// When enabled, you'll see "React Compiler: compiled X functions" in Metro logs
18-
compilationMode: 'infer', // 'annotation' | 'all' | 'infer'
19-
20-
/*
21-
panicThreshold: 'all_errors', // Show all compilation errors/warnings
22-
logger: {
23-
logEvent(filename, event) {
24-
console.log(`[React Compiler] ${filename}: ${event}`);
25-
},
26-
}*/
17+
compilationMode: 'infer',
2718
},
2819
],
2920
],

example/ios/Podfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ target 'RNMapboxExample' do
9292
end
9393
react_native_post_install(
9494
installer,
95-
# Set `mac_catalyst_enabled` to `true` in order to apply patches
96-
# necessary for Mac Catalyst builds
95+
config[:reactNativePath],
9796
:mac_catalyst_enabled => false,
9897
# :ccache_enabled => true
9998
)

0 commit comments

Comments
 (0)