Skip to content

Commit e3c4aae

Browse files
EXT-FSS2 Added support for React Native 0.73
Update build.gradle to set sourceCompatibility and targetCompatibility to JavaVersion.VERSION_11 for AGP versions below 8
1 parent 56b64ae commit e3c4aae

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

android/build.gradle

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,16 @@ afterEvaluate {
5858
android {
5959
compileSdkVersion safeExtGet("compileSdkVersion", 33)
6060

61-
compileOptions {
62-
sourceCompatibility JavaVersion.VERSION_11
63-
targetCompatibility JavaVersion.VERSION_11
64-
}
61+
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
62+
if (agpVersion.tokenize('.')[0].toInteger() < 8) {
63+
compileOptions {
64+
sourceCompatibility JavaVersion.VERSION_11
65+
targetCompatibility JavaVersion.VERSION_11
66+
}
6567

66-
kotlinOptions {
67-
jvmTarget = JavaVersion.VERSION_11.majorVersion
68+
kotlinOptions {
69+
jvmTarget = JavaVersion.VERSION_11.majorVersion
70+
}
6871
}
6972

7073
namespace "uk.co.playerdata.reactnativemcumanager"

0 commit comments

Comments
 (0)