From 1f3a35949beecf3c915c4e9251f3780c851e6c8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BBerko?= Date: Thu, 20 Jul 2023 12:07:28 +0200 Subject: [PATCH 1/6] chore: update to java 17 --- android/build.gradle.kts | 4 ++-- .../kotlin/com/wire/kalium/plugins/CommonAndroidConfig.kt | 4 ++-- .../main/kotlin/com/wire/kalium/plugins/CommonJvmConfig.kt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/android/build.gradle.kts b/android/build.gradle.kts index 72fb59ed5cc..c79f6dc5861 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -50,8 +50,8 @@ android { } compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { 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..b47cbdc93e4 100644 --- a/buildSrc/src/main/kotlin/com/wire/kalium/plugins/CommonAndroidConfig.kt +++ b/buildSrc/src/main/kotlin/com/wire/kalium/plugins/CommonAndroidConfig.kt @@ -50,8 +50,8 @@ 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") 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 { From 511777e03920c427bd5ac363914feb39991882fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BBerko?= Date: Thu, 20 Jul 2023 12:10:45 +0200 Subject: [PATCH 2/6] one more update --- android/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle.kts b/android/build.gradle.kts index c79f6dc5861..da1b5c61e41 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -55,7 +55,7 @@ android { } kotlinOptions { - jvmTarget = "1.8" + jvmTarget = "17" freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn" } From 682d99f19bf5fdf6885d381576a8e2fb1ab3ebb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BBerko?= Date: Thu, 20 Jul 2023 12:48:08 +0200 Subject: [PATCH 3/6] update java version in test service --- testservice/build.gradle.kts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/testservice/build.gradle.kts b/testservice/build.gradle.kts index 032d864e97f..0a7f071d4ac 100644 --- a/testservice/build.gradle.kts +++ b/testservice/build.gradle.kts @@ -33,6 +33,11 @@ object Versions { val mainFunctionClassName = "com.wire.kalium.testservice.TestserviceApplication" +java { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} + application { mainClass.set(mainFunctionClassName) } From a9cf03f81d0bc9716af34ac0b33436752dac952e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BBerko?= Date: Thu, 20 Jul 2023 13:11:51 +0200 Subject: [PATCH 4/6] fix --- testservice/build.gradle.kts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/testservice/build.gradle.kts b/testservice/build.gradle.kts index 0a7f071d4ac..a8c5e216890 100644 --- a/testservice/build.gradle.kts +++ b/testservice/build.gradle.kts @@ -38,6 +38,12 @@ java { targetCompatibility = JavaVersion.VERSION_17 } +tasks.withType { + kotlinOptions { + jvmTarget = "17" + } +} + application { mainClass.set(mainFunctionClassName) } From 5534f7f2e49c2d9940c20599c5c8fb0d60eda500 Mon Sep 17 00:00:00 2001 From: Vitor Hugo Schwaab Date: Mon, 24 Jul 2023 10:20:03 +0200 Subject: [PATCH 5/6] ci: bump cryptobox image to 1.4.0 This one uses JDK 17 --- .github/workflows/gradle-jvm-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle-jvm-tests.yml b/.github/workflows/gradle-jvm-tests.yml index 7dc4fe36128..56f20e2c221 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 From 43968a40eec36544f3d3f2cdd4d1beb003ced7e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BBerko?= Date: Mon, 24 Jul 2023 14:40:06 +0200 Subject: [PATCH 6/6] updated kotlin to jvm 17 --- .../main/kotlin/com/wire/kalium/plugins/CommonAndroidConfig.kt | 1 + 1 file changed, 1 insertion(+) 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 b47cbdc93e4..33f6a1c9b7d 100644 --- a/buildSrc/src/main/kotlin/com/wire/kalium/plugins/CommonAndroidConfig.kt +++ b/buildSrc/src/main/kotlin/com/wire/kalium/plugins/CommonAndroidConfig.kt @@ -53,6 +53,7 @@ fun LibraryExtension.commonAndroidLibConfig( sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } + packagingOptions { resources.pickFirsts.add("google/protobuf/*.proto") jniLibs.pickFirsts.add("**/libsodium.so")