Skip to content

Commit 029b4ae

Browse files
committed
chore: Verify compatibility with React Native 0.79
- React 19.1.0 doesn't work currently. - Bumped used React Native version to 0.79.2
1 parent d784e86 commit 029b4ae

15 files changed

Lines changed: 533 additions & 1542 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/
2222

2323
- Validate that the New Architecture works in the example app.
2424
- Required a workaround for CMAKE due to long paths in Windows.
25+
- Validate compatibility with React Native 0.79 & Expo SDK 53.
2526

2627
## [0.8.0] - 2025-02-13
2728

examples/benchmarking-demo/App.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import { Image } from 'expo-image';
88
import * as MediaLibrary from 'expo-media-library';
99
import { StatusBar } from 'expo-status-bar';
1010
import { useEffect, useState } from 'react';
11-
import { StyleSheet, Text, View } from 'react-native';
11+
import type { TextProps } from 'react-native';
12+
import { StyleSheet, Text as RNText, View } from 'react-native';
1213
import {
1314
SafeAreaProvider,
1415
useSafeAreaInsets,
@@ -162,6 +163,10 @@ function Container({ children }: { children: React.ReactNode }) {
162163
</View>
163164
);
164165
}
166+
function Text({ style, ...props }: TextProps) {
167+
// eslint-disable-next-line react-native/no-inline-styles
168+
return <RNText style={[{ color: 'black' }, style]} {...props} />;
169+
}
165170

166171
const styles = StyleSheet.create({
167172
container: {

examples/benchmarking-demo/android/app/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ react {
1414
hermesCommand = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc"
1515
codegenDir = new File(["node", "--print", "require.resolve('@react-native/codegen/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()
1616

17+
enableBundleCompression = (findProperty('android.enableBundleCompression') ?: false).toBoolean()
1718
// Use Expo CLI to bundle the app, this ensures the Metro config
1819
// works correctly with Expo projects.
1920
cliFile = new File(["node", "--print", "require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })"].execute(null, rootDir).text.trim())
@@ -78,7 +79,7 @@ def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInRelea
7879
* give correct results when using with locales other than en-US. Note that
7980
* this variant is about 6MiB larger per architecture than default.
8081
*/
81-
def jscFlavor = 'org.webkit:android-jsc:+'
82+
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
8283

8384
android {
8485
ndkVersion rootProject.ext.ndkVersion
@@ -181,15 +182,15 @@ dependencies {
181182

182183
if (isGifEnabled) {
183184
// For animated gif support
184-
implementation("com.facebook.fresco:animated-gif:${reactAndroidLibs.versions.fresco.get()}")
185+
implementation("com.facebook.fresco:animated-gif:${expoLibs.versions.fresco.get()}")
185186
}
186187

187188
if (isWebpEnabled) {
188189
// For webp support
189-
implementation("com.facebook.fresco:webpsupport:${reactAndroidLibs.versions.fresco.get()}")
190+
implementation("com.facebook.fresco:webpsupport:${expoLibs.versions.fresco.get()}")
190191
if (isWebpAnimatedEnabled) {
191192
// Animated webp support
192-
implementation("com.facebook.fresco:animated-webp:${reactAndroidLibs.versions.fresco.get()}")
193+
implementation("com.facebook.fresco:animated-webp:${expoLibs.versions.fresco.get()}")
193194
}
194195
}
195196

examples/benchmarking-demo/android/app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@
2020
<action android:name="android.intent.action.MAIN"/>
2121
<category android:name="android.intent.category.LAUNCHER"/>
2222
</intent-filter>
23-
<intent-filter>
24-
<action android:name="android.intent.action.VIEW"/>
25-
<category android:name="android.intent.category.DEFAULT"/>
26-
<category android:name="android.intent.category.BROWSABLE"/>
27-
<data android:scheme="com.anonymous.benchmarking.rnmr"/>
28-
</intent-filter>
2923
</activity>
3024
</application>
3125
</manifest>

examples/benchmarking-demo/android/app/src/main/java/com/anonymous/benchmarking/rnmr/MainApplication.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class MainApplication : Application(), ReactApplication {
2424
override fun getPackages(): List<ReactPackage> {
2525
val packages = PackageList(this).packages
2626
// Packages that cannot be autolinked yet can be added manually here, for example:
27-
// packages.add(new MyReactNativePackage());
27+
// packages.add(MyReactNativePackage())
2828
return packages
2929
}
3030

examples/benchmarking-demo/android/app/src/main/res/values/styles.xml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
<resources xmlns:tools="http://schemas.android.com/tools">
2-
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
3-
<item name="android:textColor">@android:color/black</item>
4-
<item name="android:editTextStyle">@style/ResetEditText</item>
2+
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
53
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
4+
<item name="android:windowOptOutEdgeToEdgeEnforcement" tools:targetApi="35">true</item>
65
<item name="colorPrimary">@color/colorPrimary</item>
76
<item name="android:statusBarColor">#ffffff</item>
87
</style>
9-
<style name="ResetEditText" parent="@android:style/Widget.EditText">
10-
<item name="android:padding">0dp</item>
11-
<item name="android:textColorHint">#c8c8c8</item>
12-
<item name="android:textColor">@android:color/black</item>
13-
</style>
148
<style name="Theme.App.SplashScreen" parent="AppTheme">
159
<item name="android:windowBackground">@drawable/ic_launcher_background</item>
1610
</style>
Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,37 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext {
5-
buildToolsVersion = findProperty('android.buildToolsVersion') ?: '35.0.0'
6-
minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '24')
7-
compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '35')
8-
targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '34')
9-
kotlinVersion = findProperty('android.kotlinVersion') ?: '2.0.21'
10-
11-
ndkVersion = "27.1.12297006"
12-
}
13-
repositories {
14-
google()
15-
mavenCentral()
16-
}
17-
dependencies {
18-
classpath('com.android.tools.build:gradle')
19-
classpath('com.facebook.react:react-native-gradle-plugin')
20-
classpath('org.jetbrains.kotlin:kotlin-gradle-plugin')
21-
}
4+
repositories {
5+
google()
6+
mavenCentral()
7+
}
8+
dependencies {
9+
classpath('com.android.tools.build:gradle')
10+
classpath('com.facebook.react:react-native-gradle-plugin')
11+
classpath('org.jetbrains.kotlin:kotlin-gradle-plugin')
12+
}
2213
}
2314

24-
apply plugin: "com.facebook.react.rootproject"
15+
def reactNativeAndroidDir = new File(
16+
providers.exec {
17+
workingDir(rootDir)
18+
commandLine("node", "--print", "require.resolve('react-native/package.json')")
19+
}.standardOutput.asText.get().trim(),
20+
"../android"
21+
)
2522

2623
allprojects {
27-
repositories {
28-
maven {
29-
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
30-
url(new File(['node', '--print', "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), '../android'))
31-
}
32-
maven {
33-
// Android JSC is installed from npm
34-
url(new File(['node', '--print', "require.resolve('jsc-android/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim(), '../dist'))
35-
}
36-
37-
google()
38-
mavenCentral()
39-
maven { url 'https://www.jitpack.io' }
24+
repositories {
25+
maven {
26+
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
27+
url(reactNativeAndroidDir)
4028
}
29+
30+
google()
31+
mavenCentral()
32+
maven { url 'https://www.jitpack.io' }
33+
}
4134
}
35+
36+
apply plugin: "expo-root-project"
37+
apply plugin: "com.facebook.react.rootproject"

examples/benchmarking-demo/android/gradle.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ EX_DEV_CLIENT_NETWORK_INSPECTOR=true
5555
# Use legacy packaging to compress native libraries in the resulting APK.
5656
expo.useLegacyPackaging=false
5757

58+
# Whether the app is configured to use edge-to-edge via the app config or `react-native-edge-to-edge` plugin
59+
expo.edgeToEdgeEnabled=false
5860
android.enableProguardInReleaseBuilds=true
59-
android.enableShrinkResourcesInReleaseBuilds=true
60-
android.extraMavenRepos=[]
61+
android.enableShrinkResourcesInReleaseBuilds=true

examples/benchmarking-demo/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.10.2-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

examples/benchmarking-demo/android/gradlew

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

0 commit comments

Comments
 (0)