Improved JDK compatibility

This commit is contained in:
Josh-Larson
2021-04-13 07:05:34 -05:00
parent 1e6cc05dc8
commit 99b81aa05f

View File

@@ -1,12 +1,19 @@
plugins {
idea
java
id("org.javamodularity.moduleplugin")
`java-library`
kotlin("jvm")
}
val javaVersion: String by ext
val javaMajorVersion: String by ext
val kotlinTargetJdk: String by ext
java {
modularity.inferModulePath.set(true)
}
idea {
targetVersion = "12.0.1"
targetVersion = javaVersion
module {
inheritOutputDirs = true
}
@@ -19,14 +26,16 @@ repositories {
sourceSets {
main {
java.outputDir = File(java.outputDir.toString().replace("\\${File.separatorChar}java", ""))
dependencies {
implementation(project(":pswgcommon"))
implementation(project(":client-holocore"))
implementation(kotlin("stdlib"))
}
}
test {
dependencies {
implementation(kotlin("stdlib"))
implementation(group="junit", name="junit", version="4.12")
}
}
@@ -34,6 +43,7 @@ sourceSets {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "12"
jvmTarget = kotlinTargetJdk
}
destinationDir = sourceSets.main.get().java.outputDir
}