Skip to content

Commit

Permalink
Set Java source/target compatibility for react-native-gradle-plugin to 8
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cortinico authored and Andrei Shikov committed Feb 24, 2022
1 parent b1c30f8 commit f5d371a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-native-gradle-plugin/build.gradle.kts
Expand Up @@ -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<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
Expand Down

0 comments on commit f5d371a

Please sign in to comment.