Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Java 11 everywhere #649

Merged
merged 5 commits into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/.ci_test_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
- name: Set up our JDK environment
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
distribution: zulu
java-version: 11

- name: Upload Artifacts
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 17
java-version: 11
- name: Run tests
run: ./gradlew check --rerun-tasks --stacktrace
- name: Upload code coverage
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
distribution: zulu
java-version: 11
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Run check with Gradle Wrapper
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ subprojects {
tasks {
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
jvmTarget = "11"
}
}

withType<JavaCompile>().configureEach {
sourceCompatibility = JavaVersion.VERSION_17.name
targetCompatibility = JavaVersion.VERSION_17.name
sourceCompatibility = JavaVersion.VERSION_11.name
targetCompatibility = JavaVersion.VERSION_11.name
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
androidMinSdk = "24"
androidCompileSdk = "33"
androidGradlePlugin = "8.2.2"
androidGradlePlugin = "7.4.2"
androidTargetSdk = "33"
atomicFu = "0.24.0"
baseKotlin = "2.0.0"
Expand Down
8 changes: 4 additions & 4 deletions paging/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ kotlin {
}
}

jvmToolchain(17)
jvmToolchain(11)
}

android {
Expand All @@ -75,16 +75,16 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}

tasks.withType<DokkaTask>().configureEach {
dokkaSourceSets.configureEach {
reportUndocumented.set(false)
skipDeprecated.set(true)
jdkVersion.set(17)
jdkVersion.set(11)
}
}

Expand Down
6 changes: 3 additions & 3 deletions tooling/plugins/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ plugins {
group = "org.mobilenativefoundation.store"

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

toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion.set(JavaLanguageVersion.of(11))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class AndroidConventionPlugin : Plugin<Project> {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class KotlinMultiplatformConventionPlugin : Plugin<Project> {
nodejs()
}

jvmToolchain(17)
jvmToolchain(11)

targets.all {
compilations.all {
Expand Down Expand Up @@ -135,7 +135,7 @@ fun Project.configureKotlin() {
fun Project.configureJava() {
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion.set(JavaLanguageVersion.of(11))
}
}
}
Expand All @@ -156,8 +156,8 @@ fun Project.configureAndroid() {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
}
Expand Down Expand Up @@ -218,12 +218,12 @@ fun Project.configureDokka() = tasks.withType<DokkaTask>().configureEach {
dokkaSourceSets.configureEach {
reportUndocumented.set(false)
skipDeprecated.set(true)
jdkVersion.set(17)
jdkVersion.set(11)
}
}

fun Project.android(name: String) {
android {
namespace = "org.mobilenativefoundation.store.$name"
}
}
}
Loading