Skip to content

Commit

Permalink
chore: update to java 17 (#1902) (#1915)
Browse files Browse the repository at this point in the history
Co-authored-by: Jakub Żerko <[email protected]>
Co-authored-by: Vitor Hugo Schwaab <[email protected]>
  • Loading branch information
3 people authored Jul 24, 2023
1 parent 7e7615f commit 3f79b42
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle-jvm-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
11 changes: 11 additions & 0 deletions testservice/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ object Versions {

val mainFunctionClassName = "com.wire.kalium.testservice.TestserviceApplication"

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
}
}

application {
mainClass.set(mainFunctionClassName)
}
Expand Down

0 comments on commit 3f79b42

Please sign in to comment.