Skip to content

Commit

Permalink
make build java 1.8 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximilian Stiede committed Feb 25, 2021
1 parent d7002f6 commit 61fc75d
Showing 1 changed file with 22 additions and 25 deletions.
47 changes: 22 additions & 25 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile

plugins {
kotlin("jvm") version "1.4.30"
id("application")
id("org.openjfx.javafxplugin") version "0.0.9"
idea
}

Expand All @@ -22,35 +20,34 @@ dependencies {

implementation("se.llbit:chunky-core:2.4.0-SNAPSHOT")

implementation(platform("com.fasterxml.jackson:jackson-bom:2.12.+"))
implementation("com.fasterxml.jackson.core:jackson-databind")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")

implementation("no.tornado:tornadofx:1.7.20")
}

javafx {
version = "15.0.1"
modules = listOf("javafx.controls", "javafx.fxml")
}
application {
mainClass.set("de.groovybyte.chunky.magickexportplugin.MagickExportPluginKt")
}
tasks.withType<Jar> {
manifest {
attributes["Main-Class"] = application.mainClass.get()
tasks {
withType<JavaCompile> {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
configurations["compileClasspath"].forEach { file: File ->
from(zipTree(file.absoluteFile))
withType<Jar> {
archiveFileName.set("${archiveBaseName.get()}.${archiveExtension.get()}")
configurations["compileClasspath"].apply {
files { dep ->
when {
dep.name.startsWith("chunky") -> false
else -> true
}
}.forEach { file ->
from(zipTree(file.absoluteFile))
}
}
}
}

tasks.withType<KotlinJvmCompile> {
kotlinOptions {
jvmTarget = "1.8"
languageVersion = "1.4"
useIR = true
withType<KotlinJvmCompile> {
kotlinOptions {
jvmTarget = "1.8"
languageVersion = "1.4"
useIR = true
}
}
}

Expand Down

0 comments on commit 61fc75d

Please sign in to comment.