Skip to content

Commit

Permalink
Merge pull request #78 from SimpleTimeTracking/task/upgrade-java-gradle
Browse files Browse the repository at this point in the history
upgrade to gradle 8.10 to upgrade to java 21 to fix issue #77
  • Loading branch information
barclay-reg authored Aug 21, 2024
2 parents d4d1c3c + b22e3b0 commit e5a5ea1
Show file tree
Hide file tree
Showing 6 changed files with 222 additions and 161 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
java-version: 21
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Execute Gradle build
Expand Down
37 changes: 19 additions & 18 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
import org.apache.tools.ant.filters.ReplaceTokens
import org.jetbrains.kotlin.gradle.internal.KaptTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.sonarqube.gradle.SonarQubeTask
import org.javamodularity.moduleplugin.extensions.TestModuleOptions
import org.gradle.internal.os.OperatingSystem


plugins {
val kotlinVersion = "1.7.10"
val kotlinVersion = "1.9.24"
application

jacoco
idea
antlr
kotlin("jvm") version kotlinVersion
kotlin("kapt") version kotlinVersion
id("org.sonarqube") version "3.1"
id("org.sonarqube") version "5.1.0.4882"
id("com.github.ben-manes.versions") version "0.36.0"

id("org.openjfx.javafxplugin") version "0.0.13"
id("org.openjfx.javafxplugin") version "0.1.0"

id("org.javamodularity.moduleplugin") version "1.8.12"
id("org.beryx.jlink") version "2.25.0"
id("org.beryx.jlink") version "3.0.1"

id("com.palantir.git-version") version "2.0.0"
}
Expand Down Expand Up @@ -49,7 +48,7 @@ application {
}

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

kapt {
Expand All @@ -65,7 +64,7 @@ configurations {
val spek_version = "2.0.4"

dependencies {
val daggerVersion = "2.43.1"
val daggerVersion = "2.50" // with dagger 2.52 they introduced an incomplete usage ofjakarta.inject
antlr(group = "org.antlr", name = "antlr4", version = "4.9.1")
implementation(group = "org.antlr", name = "antlr4-runtime", version = "4.9.1")

Expand All @@ -82,17 +81,24 @@ dependencies {
implementation(kotlin("stdlib-jdk8"))

testImplementation("commons-io:commons-io:2.8.0")
testImplementation("org.mockito:mockito-core:4.5.1")
testImplementation("org.mockito.kotlin:mockito-kotlin:4.1.0")
testImplementation("org.assertj:assertj-core:3.18.1")
testImplementation("org.mockito:mockito-core:5.12.0")
testImplementation("org.mockito.kotlin:mockito-kotlin:5.4.0")
testImplementation("org.assertj:assertj-core:3.26.3")
testImplementation("junit:junit-dep:4.11")
}

javafx {
version = "17.0.1"
version = "21.0.4"
modules("javafx.base", "javafx.controls", "javafx.fxml", "javafx.graphics")
}

sonar {
properties {
property("sonar.projectkey", "org.stt:stt")
property("sonar.projectName", "SimpleTimeTracking")
}
}

distributions.getByName("main") {
contents {
include("**/STT*")
Expand All @@ -117,7 +123,7 @@ tasks.test {
}
}

tasks.withType<KaptTask> {
tasks.withType<org.jetbrains.kotlin.gradle.internal.KaptGenerateStubsTask> {
dependsOn(tasks.withType<AntlrTask>())
}
// provided by plugin: com.palantir.git-version
Expand Down Expand Up @@ -161,13 +167,8 @@ tasks.withType<AntlrTask> {
arguments = arguments + "-visitor" + "-long-messages"
}

tasks.withType<SonarQubeTask> {
properties += "sonar.projectName" to "SimpleTimeTracking"
properties += "sonar.projectKey" to "org.stt:stt"
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
kotlinOptions.jvmTarget = "21"
}

//tasks.named("dependencyUpdates", com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask::class.java).configure {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit e5a5ea1

Please sign in to comment.