Merge pull request #615 from dmcg/master

Upgrading versions for the Kotlin project
This commit is contained in:
Emily Bache 2025-04-15 06:12:34 +00:00 committed by GitHub
commit 4b04f58363
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 17 deletions

View File

@ -1,7 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.9.10"
kotlin("jvm") version "2.1.20"
application
}
@ -12,16 +10,20 @@ repositories {
mavenCentral()
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}
dependencies {
implementation(kotlin("stdlib"))
testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
testImplementation(kotlin("test"))
testImplementation("org.junit.jupiter:junit-jupiter:5.12.2")
}
tasks.test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
tasks.register<JavaExec>("texttest") {
@ -32,15 +34,6 @@ tasks.register<JavaExec>("texttest") {
args("30")
}
// config JVM target to 1.8 for kotlin compilation tasks
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "1.8"
}
// config java extension to same target version, to avoid build failure on Gradle 8.x
java {
targetCompatibility = JavaVersion.VERSION_1_8
}
application {
mainClass.set("com.gildedrose.TexttestFixtureKt")

View File

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME