Skip to content

chore: Upgrade from jvm 1 to jvm 2 #38

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

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Changes from all 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
22 changes: 11 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
// 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"

// Apply the java-library plugin for API and implementation separation.
Expand Down Expand Up @@ -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 commitId = "git rev-parse HEAD".runCommand(workingDir = rootDir)

val finalVersion = System.getenv("version") as String? ?: tag.drop(1) ?: "2.0.0"
val finalGroup = System.getenv("group") as String? ?: "net.tcgdex"
val artifact = System.getenv("artifact") as String? ?: "sdk"
val finalVersion = System.getenv("version") ?: tag.drop(1) ?: "2.0.0"
val finalGroup = System.getenv("group") ?: "net.tcgdex"
val artifact = System.getenv("artifact") ?: "sdk"

group = finalGroup
version = finalVersion
Expand All @@ -59,19 +61,17 @@ tasks.test {
}
}


tasks {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
}

java {
withJavadocJar()
withSourcesJar()

targetCompatibility = JavaVersion.VERSION_1_8
}

// Javadocs
Expand Down
Loading