gradle: use Java 17

It appears to work, even on API 21.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2023-05-03 14:01:05 +02:00
parent 6d67a3d5f5
commit 4e28d57aee
2 changed files with 5 additions and 5 deletions

View File

@ -10,8 +10,8 @@ plugins {
android { android {
compileSdk = 33 compileSdk = 33
compileOptions { compileOptions {
sourceCompatibility = JavaVersion.VERSION_11 sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_17
} }
namespace = "com.wireguard.android.tunnel" namespace = "com.wireguard.android.tunnel"
defaultConfig { defaultConfig {

View File

@ -25,8 +25,8 @@ android {
buildConfigField("int", "MIN_SDK_VERSION", minSdk.toString()) buildConfigField("int", "MIN_SDK_VERSION", minSdk.toString())
} }
compileOptions { compileOptions {
sourceCompatibility = JavaVersion.VERSION_11 sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_17
isCoreLibraryDesugaringEnabled = true isCoreLibraryDesugaringEnabled = true
} }
buildTypes { buildTypes {
@ -78,5 +78,5 @@ tasks.withType<JavaCompile>().configureEach {
} }
tasks.withType<KotlinCompile>().configureEach { tasks.withType<KotlinCompile>().configureEach {
compilerOptions.jvmTarget.set(JvmTarget.JVM_11) compilerOptions.jvmTarget.set(JvmTarget.JVM_17)
} }