hermes-engine should build with target Java version 17 (#51162)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/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
This commit is contained in:
Nicola Corti
2025-05-08 03:17:16 -07:00
committed by Facebook GitHub Bot
parent f75c8f6f04
commit db18aac521
@@ -250,6 +250,11 @@ android {
}
}
ndk { abiFilters.addAll(reactNativeArchitectures()) }
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
externalNativeBuild {