Skip to content

Commit

Permalink
Set minimum JDK to 11
Browse files Browse the repository at this point in the history
  • Loading branch information
pemistahl committed Oct 25, 2023
1 parent 55b72ee commit 6b666d5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
java-version: [ 8, 11, 17 ]
java-version: [ 11, 17, 20 ]

steps:
- name: Check out repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
java-version: 11
cache: 'gradle'

- name: Get tag version
Expand Down
26 changes: 17 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
import com.adarshr.gradle.testlogger.theme.ThemeType
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import ru.vyarus.gradle.plugin.python.task.PythonTask
import java.util.Locale

val linguaTaskGroup: String by project
val linguaGroupId: String by project
val linguaArtifactId: String by project
val linguaVersion: String by project
val linguaName: String by project
val linguaDescription: String by project
val linguaLicenseName: String by project
Expand All @@ -49,7 +49,7 @@ group = linguaGroupId
description = linguaDescription

plugins {
kotlin("jvm") version "1.9.0"
kotlin("jvm") version "1.9.10"
id("org.jlleitschuh.gradle.ktlint") version "11.0.0"
id("com.adarshr.test-logger") version "3.2.0"
id("com.asarkar.gradle.build-time-tracker") version "3.0.1" // newer versions need Java 11+
Expand All @@ -62,6 +62,17 @@ plugins {
jacoco
}

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

kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_11
}
}

jacoco.toolVersion = "0.8.8"

sourceSets {
Expand Down Expand Up @@ -106,12 +117,9 @@ testing {
}
}

// Module tests require Java 9 or newer to compile and execute
if (JavaVersion.current().isJava9Compatible) {
tasks.check {
@Suppress("UnstableApiUsage")
dependsOn(testing.suites.named("integrationTest"))
}
tasks.check {
@Suppress("UnstableApiUsage")
dependsOn(testing.suites.named("integrationTest"))
}

tasks.jacocoTestReport {
Expand Down Expand Up @@ -282,7 +290,7 @@ tasks.register<PythonTask>("writeAccuracyTable") {

tasks.withType<DokkaTask>().configureEach {
dokkaSourceSets.configureEach {
jdkVersion.set(8)
jdkVersion.set(11)
reportUndocumented.set(false)
perPackageOption {
matchingRegex.set(".*\\.(app|internal).*")
Expand Down

0 comments on commit 6b666d5

Please sign in to comment.