-
-
Save brentvatne/61cd1a938fb4ba8869bc490647aa52e8 to your computer and use it in GitHub Desktop.
Android Expo Module SDK 49 -> 51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/packages/expo-module-template/android/build.gradle | |
+++ b/packages/expo-module-template/android/build.gradle | |
@@ -53,19 +53,22 @@ afterEvaluate { | |
android { | |
compileSdkVersion safeExtGet("compileSdkVersion", 33) | |
- compileOptions { | |
- sourceCompatibility JavaVersion.VERSION_11 | |
- targetCompatibility JavaVersion.VERSION_11 | |
- } | |
+ def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION | |
+ if (agpVersion.tokenize('.')[0].toInteger() < 8) { | |
+ compileOptions { | |
+ sourceCompatibility JavaVersion.VERSION_11 | |
+ targetCompatibility JavaVersion.VERSION_11 | |
+ } | |
- kotlinOptions { | |
- jvmTarget = JavaVersion.VERSION_11.majorVersion | |
+ kotlinOptions { | |
+ jvmTarget = JavaVersion.VERSION_11.majorVersion | |
+ } | |
} | |
namespace "<%- project.package %>" | |
defaultConfig { | |
minSdkVersion safeExtGet("minSdkVersion", 21) | |
- targetSdkVersion safeExtGet("targetSdkVersion", 33) | |
+ targetSdkVersion safeExtGet("targetSdkVersion", 34) | |
versionCode 1 | |
versionName "<%- project.version %>" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment