Target Java 14
This commit is contained in:
parent
a417ebe86f
commit
44f5b41c29
|
@ -1,3 +1,3 @@
|
|||
# SnowyGUI
|
||||
|
||||
This mod requires fabric-language-kotlin on fabric, and kotlinforforge on forge.
|
||||
This mod requires fabric-language-kotlin on fabric, kotlinforforge on forge **and also needs Java 14 or higher**.
|
|
@ -86,6 +86,7 @@ subprojects {
|
|||
}
|
||||
}
|
||||
|
||||
val javaVer: String = "14"
|
||||
val kotlinVer = rootProject.property("kotlin_stdlib_version").toString() + ".0"
|
||||
val mcBase: String = rootProject.architectury.minecraft.dropLast(2)
|
||||
allprojects {
|
||||
|
@ -105,8 +106,8 @@ allprojects {
|
|||
implementation(kotlin("stdlib-jdk8", kotlinVer))
|
||||
}
|
||||
java {
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_14
|
||||
sourceCompatibility = JavaVersion.VERSION_14
|
||||
}
|
||||
tasks {
|
||||
withType(ShadowJar::class) {
|
||||
|
@ -127,7 +128,7 @@ allprojects {
|
|||
withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
|
||||
with(kotlinOptions) {
|
||||
freeCompilerArgs = listOf("-Xjvm-default=all", "-Xlambdas=indy")
|
||||
jvmTarget = "1.8"
|
||||
jvmTarget = javaVer
|
||||
languageVersion = "1.5"
|
||||
apiVersion = rootProject.property("kotlin_stdlib_version").toString()
|
||||
}
|
||||
|
@ -135,9 +136,7 @@ allprojects {
|
|||
withType(JavaCompile::class) {
|
||||
with(options) {
|
||||
encoding = "UTF-8"
|
||||
if (JavaVersion.current().isJava9Compatible) {
|
||||
release.set(8)
|
||||
}; isFork = true
|
||||
release.set(javaVer.toInt()); isFork = true
|
||||
}
|
||||
}
|
||||
withType(net.fabricmc.loom.task.RemapJarTask::class) {
|
||||
|
@ -157,6 +156,7 @@ allprojects {
|
|||
val modProperties = mapOf(
|
||||
"mod_version" to (rootProject.version as String),
|
||||
"minecraft_version" to mcBase,
|
||||
"java_version" to javaVer,
|
||||
"mod_group" to this@allprojects.group,
|
||||
"fabric_kotlin" to rootProject.property("fabric_language_kotlin"),
|
||||
"kotlinforforge" to rootProject.property("kotlinforforge")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"required": true,
|
||||
"package": "fr.username404.snowygui.mixins",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"compatibilityLevel": "JAVA_14",
|
||||
"client": [
|
||||
"KeysAccessor",
|
||||
"KeyMappings",
|
||||
|
|
|
@ -31,13 +31,14 @@
|
|||
"snowygui-mixins.json"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.9.3",
|
||||
"fabricloader": ">=0.11.0",
|
||||
"fabric-language-kotlin": ">=${fabric_kotlin}",
|
||||
"fabric-resource-loader-v0": "*",
|
||||
"fabric-rendering-v1": "*",
|
||||
"minecraft": ">=${minecraft_version}"
|
||||
},
|
||||
"breaks": {
|
||||
"java": "<${java_version}",
|
||||
"modmenu": "<1.15.0"
|
||||
},
|
||||
"suggests": {
|
||||
|
|
Loading…
Reference in New Issue