diff --git a/.github/workflows/gradle-jvm-tests.yml b/.github/workflows/gradle-jvm-tests.yml index 5c277874ce0..72a13b78425 100644 --- a/.github/workflows/gradle-jvm-tests.yml +++ b/.github/workflows/gradle-jvm-tests.yml @@ -19,7 +19,7 @@ jobs: needs: [detekt] runs-on: ubuntu-22.04 # TODO: When migrating away from Cryptobox, use a regular Ubuntu machine with JDK 17 and caching - container: wirebot/cryptobox:1.3.0 + container: wirebot/cryptobox:1.4.0 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/android/build.gradle.kts b/android/build.gradle.kts index 72fb59ed5cc..da1b5c61e41 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -50,12 +50,12 @@ android { } compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = "1.8" + jvmTarget = "17" freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn" } diff --git a/buildSrc/src/main/kotlin/com/wire/kalium/plugins/CommonAndroidConfig.kt b/buildSrc/src/main/kotlin/com/wire/kalium/plugins/CommonAndroidConfig.kt index 49dd8ebb8ab..33f6a1c9b7d 100644 --- a/buildSrc/src/main/kotlin/com/wire/kalium/plugins/CommonAndroidConfig.kt +++ b/buildSrc/src/main/kotlin/com/wire/kalium/plugins/CommonAndroidConfig.kt @@ -50,9 +50,10 @@ fun LibraryExtension.commonAndroidLibConfig( testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } + packagingOptions { resources.pickFirsts.add("google/protobuf/*.proto") jniLibs.pickFirsts.add("**/libsodium.so") diff --git a/buildSrc/src/main/kotlin/com/wire/kalium/plugins/CommonJvmConfig.kt b/buildSrc/src/main/kotlin/com/wire/kalium/plugins/CommonJvmConfig.kt index db3cbb26fcc..26a90d7efe5 100644 --- a/buildSrc/src/main/kotlin/com/wire/kalium/plugins/CommonJvmConfig.kt +++ b/buildSrc/src/main/kotlin/com/wire/kalium/plugins/CommonJvmConfig.kt @@ -22,7 +22,7 @@ import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget fun KotlinJvmTarget.commonJvmConfig(includeNativeInterop: Boolean) { compilations.all { - kotlinOptions.jvmTarget = "1.8" + kotlinOptions.jvmTarget = "17" kotlinOptions.freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn" } testRuns.getByName("test").executionTask.configure { diff --git a/testservice/build.gradle.kts b/testservice/build.gradle.kts index 032d864e97f..a8c5e216890 100644 --- a/testservice/build.gradle.kts +++ b/testservice/build.gradle.kts @@ -33,6 +33,17 @@ object Versions { val mainFunctionClassName = "com.wire.kalium.testservice.TestserviceApplication" +java { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} + +tasks.withType { + kotlinOptions { + jvmTarget = "17" + } +} + application { mainClass.set(mainFunctionClassName) }