diff --git a/.github/workflows/publication_maven.yml b/.github/workflows/publication_maven.yml index af931cd62..008b562d7 100644 --- a/.github/workflows/publication_maven.yml +++ b/.github/workflows/publication_maven.yml @@ -30,7 +30,7 @@ jobs: uses: actions/setup-java@v2 with: distribution: 'adopt' - java-version: 17 + java-version: 11 - name: Tests run: make unit_tests - name: Assemble build diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index c79b85e04..f63e2400e 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -19,7 +19,7 @@ jobs: uses: actions/setup-java@v2 with: distribution: 'adopt' - java-version: 17 + java-version: 11 - name: Run static analysis run: make static_analysis - name: Run unit tests diff --git a/.github/workflows/snapshot_check.yml b/.github/workflows/snapshot_check.yml index 1b2db4052..ba63a0d63 100644 --- a/.github/workflows/snapshot_check.yml +++ b/.github/workflows/snapshot_check.yml @@ -25,7 +25,7 @@ jobs: uses: actions/setup-java@v2 with: distribution: 'adopt' - java-version: 17 + java-version: 11 - name: Assemble projects run: ./gradlew -Pkaspresso.snapshotVersion=${{ inputs.kaspressoVersion }} assembleDebugAndroidTest - name: Check legal documents diff --git a/build-logic/android/src/main/kotlin/convention.android-app.gradle.kts b/build-logic/android/src/main/kotlin/convention.android-app.gradle.kts index 68c4f522e..d7d3ffddf 100644 --- a/build-logic/android/src/main/kotlin/convention.android-app.gradle.kts +++ b/build-logic/android/src/main/kotlin/convention.android-app.gradle.kts @@ -8,6 +8,11 @@ plugins { } android { + compileOptions { + targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_1_8 + } + testBuildType = "debug" defaultConfig { @@ -32,6 +37,12 @@ android { } kotlin { - jvmToolchain(JavaVersion.VERSION_17.majorVersion.toInt()) + jvmToolchain(JavaVersion.VERSION_1_8.majorVersion.toInt()) + } +} + +tasks.withType().configureEach { + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8.toString() } } diff --git a/build-logic/android/src/main/kotlin/convention.android-base.gradle.kts b/build-logic/android/src/main/kotlin/convention.android-base.gradle.kts index c9ec2868a..2fbfdf62b 100644 --- a/build-logic/android/src/main/kotlin/convention.android-base.gradle.kts +++ b/build-logic/android/src/main/kotlin/convention.android-base.gradle.kts @@ -5,6 +5,11 @@ configure { compileSdkVersion(34) + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_1_8 + } + defaultConfig { minSdk = 18 targetSdk = 30 diff --git a/build-logic/android/src/main/kotlin/convention.android-library.gradle.kts b/build-logic/android/src/main/kotlin/convention.android-library.gradle.kts index fe1bcda71..815ebea8c 100644 --- a/build-logic/android/src/main/kotlin/convention.android-library.gradle.kts +++ b/build-logic/android/src/main/kotlin/convention.android-library.gradle.kts @@ -19,4 +19,15 @@ android { ignore = true } } + + compileOptions { + targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_17 + } +} + +tasks.withType().configureEach { + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8.toString() + } } diff --git a/build-logic/kotlin/src/main/kotlin/convention.kotlin-base.gradle.kts b/build-logic/kotlin/src/main/kotlin/convention.kotlin-base.gradle.kts index d3fab73d8..2c8c03c92 100644 --- a/build-logic/kotlin/src/main/kotlin/convention.kotlin-base.gradle.kts +++ b/build-logic/kotlin/src/main/kotlin/convention.kotlin-base.gradle.kts @@ -21,6 +21,6 @@ tasks.withType().configureEach { } tasks.withType().configureEach { - sourceCompatibility = JavaVersion.VERSION_11.toString() - targetCompatibility = JavaVersion.VERSION_11.toString() + sourceCompatibility = JavaVersion.VERSION_1_8.toString() + targetCompatibility = JavaVersion.VERSION_1_8.toString() }