Skip to content

Commit 694f764

Browse files
authored
[packages] fix react-native 0.73 compatibility [1/3] (#24018)
# Why fix react-native 0.73 compatibility. these are for AGP 8 support - react-native-community/discussions-and-proposals#671 (comment) # How - [packages][bare-expo] set jvm version only if AGP < 8 - [av][dev-launcher] fix AGP 8 non transitive R issue - [dev-client][dev-launcher][dev-menu][core][notifications] fix AGP 8 non default buildConfig issue # Test Plan ci passed in #23961 (https://github.com/expo/expo/pull/23961/checks)
1 parent bdea811 commit 694f764

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
### 🎉 New features
88

9+
- Added support for React Native 0.73. ([#24018](https://github.com/expo/expo/pull/24018) by [@kudo](https://github.com/kudo))
10+
911
### 🐛 Bug fixes
1012

1113
- Fixed flash is not enabled during recordings. ([#23776](https://github.com/expo/expo/pull/23776) by [@tszheichoi](https://github.com/tszheichoi))

android/build.gradle

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,16 @@ afterEvaluate {
5353
android {
5454
compileSdkVersion safeExtGet("compileSdkVersion", 33)
5555

56-
compileOptions {
57-
sourceCompatibility JavaVersion.VERSION_11
58-
targetCompatibility JavaVersion.VERSION_11
59-
}
56+
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
57+
if (agpVersion.tokenize('.')[0].toInteger() < 8) {
58+
compileOptions {
59+
sourceCompatibility JavaVersion.VERSION_11
60+
targetCompatibility JavaVersion.VERSION_11
61+
}
6062

61-
kotlinOptions {
62-
jvmTarget = JavaVersion.VERSION_11.majorVersion
63+
kotlinOptions {
64+
jvmTarget = JavaVersion.VERSION_11.majorVersion
65+
}
6366
}
6467

6568
namespace "expo.modules.camera"

0 commit comments

Comments
 (0)