Skip to content

Commit e4e7c09

Browse files
cortinicofacebook-github-bot
authored andcommitted
hermes-engine should build with target Java version 17 (#51162)
Summary: Pull Request resolved: #51162 We specify the java target version to 17 for ReactAndroid but not for hermes-engine. This is causing it to be the default (8) which will cause our build to fail on JDK 21. This fixes it. Changelog: [Internal] [Changed] - Differential Revision: D74325107
1 parent cf94070 commit e4e7c09

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/react-native/ReactAndroid/hermes-engine/build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,11 @@ android {
250250
}
251251
}
252252
ndk { abiFilters.addAll(reactNativeArchitectures()) }
253+
254+
compileOptions {
255+
sourceCompatibility = JavaVersion.VERSION_17
256+
targetCompatibility = JavaVersion.VERSION_17
257+
}
253258
}
254259

255260
externalNativeBuild {

0 commit comments

Comments
 (0)