Skip to content

Commit db18aac

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] - Reviewed By: alanleedev Differential Revision: D74325107 fbshipit-source-id: 39ba745be4fa754fb0b0408160202940a61fcd94
1 parent f75c8f6 commit db18aac

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)