Java 11 support (resolves #33)

parent 3378fee8
Pipeline #6509 passed with stages
in 6 minutes and 7 seconds
......@@ -3,6 +3,9 @@ import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.dokka.gradle.LinkMapping
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
if (!JavaVersion.current().isJava8Compatible)
error("Only JDK 8 or newer is supported!")
plugins {
kotlin("jvm") version "1.3.20"
id("org.jetbrains.dokka") version "0.9.17"
......@@ -27,6 +30,14 @@ dependencies {
// Coroutines
implementation("org.jetbrains.kotlinx", "kotlinx-coroutines-core", "1.1.1")
// OpenJFX
if (JavaVersion.current().isJava11Compatible) {
val javafxVersion = System.getProperty("java.version") ?: JavaVersion.current().majorVersion
for (pkg in listOf("base", "controls", "fxml", "graphics"))
for (os in listOf("linux", "mac", "win"))
implementation("org.openjfx", "javafx-$pkg", javafxVersion, classifier = os)
}
// Provides RichText TextAreas. Used for code input area.
implementation("org.fxmisc.richtext", "richtextfx", "0.9.2")
......@@ -136,8 +147,9 @@ clean.dependsOn(removeBuildFiles)
val compressIncludeFolder by tasks.creating(Zip::class) {
from("lib/pseuco-java-compiler/include")
archiveName = "include.zip"
destinationDir = file("src/main/resources")
archiveFileName.set("include.zip")
destinationDirectory.set(file("src/main/resources"))
}
val compressIncludeRunnerFolder by tasks.creating(Zip::class) {
......@@ -148,8 +160,8 @@ val compressIncludeRunnerFolder by tasks.creating(Zip::class) {
}
from("src/main/resources/runner")
archiveName = "includeRunner.zip"
destinationDir = file("src/main/resources")
archiveFileName.set("includeRunner.zip")
destinationDirectory.set(file("src/main/resources"))
}
val compressIncludeDebugFolder by tasks.creating(Zip::class) {
......@@ -161,8 +173,8 @@ val compressIncludeDebugFolder by tasks.creating(Zip::class) {
}
from("src/main/resources/debugger")
archiveName = "includeDebug.zip"
destinationDir = file("src/main/resources")
archiveFileName.set("includeDebug.zip")
destinationDirectory.set(file("src/main/resources"))
}
processResources.dependsOn(compressIncludeFolder)
......@@ -179,8 +191,8 @@ clean.dependsOn(removeIncludeFolders)
/* --- AOP --- */
val ajtools by configurations.creating
val ajrt by configurations.creating
val ajtools: Configuration by configurations.creating
val ajrt: Configuration by configurations.creating
dependencies {
ajtools("org.aspectj", "aspectjtools", aspectjVersion)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment