From 4e28d57aeec36406be849f0017cdda508457b307 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 3 May 2023 14:01:05 +0200 Subject: [PATCH] gradle: use Java 17 It appears to work, even on API 21. Signed-off-by: Jason A. Donenfeld --- tunnel/build.gradle.kts | 4 ++-- ui/build.gradle.kts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tunnel/build.gradle.kts b/tunnel/build.gradle.kts index 8aa79caa..f71d57c2 100644 --- a/tunnel/build.gradle.kts +++ b/tunnel/build.gradle.kts @@ -10,8 +10,8 @@ plugins { android { compileSdk = 33 compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } namespace = "com.wireguard.android.tunnel" defaultConfig { diff --git a/ui/build.gradle.kts b/ui/build.gradle.kts index 7164cf3d..67e7a12d 100644 --- a/ui/build.gradle.kts +++ b/ui/build.gradle.kts @@ -25,8 +25,8 @@ android { buildConfigField("int", "MIN_SDK_VERSION", minSdk.toString()) } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 isCoreLibraryDesugaringEnabled = true } buildTypes { @@ -78,5 +78,5 @@ tasks.withType().configureEach { } tasks.withType().configureEach { - compilerOptions.jvmTarget.set(JvmTarget.JVM_11) + compilerOptions.jvmTarget.set(JvmTarget.JVM_17) }