chore: Upgrade from jvm 1 to jvm 2 (#38)
All checks were successful
Build & test the project / build (17) (push) Successful in 19m3s
Build & test the project / build (11) (push) Successful in 19m15s
Build & test the project / build (8) (push) Successful in 16m32s
Build & test the project / build (21) (push) Successful in 17m2s

This commit is contained in:
Florian Bouillon 2024-06-26 17:23:46 +02:00 committed by GitHub
parent 8b6bbd603d
commit 7af1fa8880
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,8 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins { plugins {
// Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin. // Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin.
kotlin("jvm") version "1.6.21" kotlin("jvm") version "2.0.0"
id("org.jetbrains.dokka") version "1.9.20" id("org.jetbrains.dokka") version "1.9.20"
// Apply the java-library plugin for API and implementation separation. // Apply the java-library plugin for API and implementation separation.
@ -31,9 +33,9 @@ val branch = "git rev-parse --abbrev-ref HEAD".runCommand(workingDir = rootDir)
val tag = "git tag -l --points-at HEAD".runCommand(workingDir = rootDir) val tag = "git tag -l --points-at HEAD".runCommand(workingDir = rootDir)
val commitId = "git rev-parse HEAD".runCommand(workingDir = rootDir) val commitId = "git rev-parse HEAD".runCommand(workingDir = rootDir)
val finalVersion = System.getenv("version") as String? ?: tag.drop(1) ?: "2.0.0" val finalVersion = System.getenv("version") ?: tag.drop(1) ?: "2.0.0"
val finalGroup = System.getenv("group") as String? ?: "net.tcgdex" val finalGroup = System.getenv("group") ?: "net.tcgdex"
val artifact = System.getenv("artifact") as String? ?: "sdk" val artifact = System.getenv("artifact") ?: "sdk"
group = finalGroup group = finalGroup
version = finalVersion version = finalVersion
@ -59,19 +61,17 @@ tasks.test {
} }
} }
kotlin {
tasks { compilerOptions {
compileKotlin { jvmTarget.set(JvmTarget.JVM_1_8)
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
} }
} }
java { java {
withJavadocJar() withJavadocJar()
withSourcesJar() withSourcesJar()
targetCompatibility = JavaVersion.VERSION_1_8
} }
// Javadocs // Javadocs