From f5d371a2f9943cd9101b23ed2bf33a418cc9cc77 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Wed, 9 Feb 2022 12:04:59 -0800 Subject: [PATCH] Set Java source/target compatibility for react-native-gradle-plugin to 8 Summary: This is necessary otherwise when building from source on JVM < 11, the `compileJava` task of the Gradle Plugin will fail with `invalid source: 11`. Essentially the Gradle build will not even start because of this. Instead we delegate to a better formatted warning from either AGP or from our plugin. Changelog: [Internal] [Changed] - Set Java source/target compatibility for react-native-gradle-plugin to 8 Reviewed By: ShikaSD Differential Revision: D34111799 fbshipit-source-id: 57ab11fe6c4532576776b586f75e8fcb5c71adcd --- packages/react-native-gradle-plugin/build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native-gradle-plugin/build.gradle.kts b/packages/react-native-gradle-plugin/build.gradle.kts index 3b824bc655b..c457a5791e3 100644 --- a/packages/react-native-gradle-plugin/build.gradle.kts +++ b/packages/react-native-gradle-plugin/build.gradle.kts @@ -46,8 +46,8 @@ dependencies { } java { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } tasks.withType {