Port to 1.21
Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
0db5d80cf1
commit
c506c9a9d2
|
@ -13,11 +13,11 @@ buildscript {
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm") version "1.9.24"
|
kotlin("jvm") version "2.0.0"
|
||||||
kotlin("plugin.serialization") version "1.9.24"
|
kotlin("plugin.serialization") version "2.0.0"
|
||||||
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
||||||
id("architectury-plugin") version "[3.4.124, 3.5["
|
id("architectury-plugin") version "[3.4.124, 3.5["
|
||||||
id("dev.architectury.loom") version "1.5-SNAPSHOT" apply false
|
id("dev.architectury.loom") version "1.6-SNAPSHOT" apply false
|
||||||
id("com.github.ben-manes.versions") version "0.51.0"
|
id("com.github.ben-manes.versions") version "0.51.0"
|
||||||
id("net.kyori.indra.git") version "3.1.3"
|
id("net.kyori.indra.git") version "3.1.3"
|
||||||
id("org.cqfn.diktat.diktat-gradle-plugin") version "1.2.5"
|
id("org.cqfn.diktat.diktat-gradle-plugin") version "1.2.5"
|
||||||
|
@ -28,7 +28,7 @@ group = "fr.username404"
|
||||||
version = "0.3.5"
|
version = "0.3.5"
|
||||||
val groupAndName = "${rootProject.group}.${rootProject.name.toLowerCase()}"
|
val groupAndName = "${rootProject.group}.${rootProject.name.toLowerCase()}"
|
||||||
|
|
||||||
val javaVer: String = "17"
|
val javaVer: String = "21"
|
||||||
val sourceJavaVer: String = javaVer
|
val sourceJavaVer: String = javaVer
|
||||||
val kotlinVer: String by rootProject
|
val kotlinVer: String by rootProject
|
||||||
val kotlinSplitVersion = kotlinVer.split('.')
|
val kotlinSplitVersion = kotlinVer.split('.')
|
||||||
|
@ -51,18 +51,10 @@ subprojects {
|
||||||
apply(plugin = "org.jetbrains.kotlin.plugin.serialization")
|
apply(plugin = "org.jetbrains.kotlin.plugin.serialization")
|
||||||
extensions.configure<LoomGradleExtension>("loom") {
|
extensions.configure<LoomGradleExtension>("loom") {
|
||||||
mappingsDep = layered {
|
mappingsDep = layered {
|
||||||
officialMojangMappings().parchment("org.parchmentmc.data:parchment-1.20.1:2023.06.26")
|
|
||||||
}
|
|
||||||
silentMojangMappingsLicense()
|
silentMojangMappingsLicense()
|
||||||
|
officialMojangMappings().parchment("org.parchmentmc.data:parchment-1.21:2024.06.23")
|
||||||
|
}
|
||||||
val refmap = "snowygui-${project.name}-refmap.json"
|
val refmap = "snowygui-${project.name}-refmap.json"
|
||||||
mixin {
|
|
||||||
defaultRefmapName.set(refmap)
|
|
||||||
if (isForge) {
|
|
||||||
forge {
|
|
||||||
mixinConfigs("snowygui-common.mixins.json", "snowygui-forge.mixins.json")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
apply(plugin = "com.github.johnrengelman.shadow")
|
apply(plugin = "com.github.johnrengelman.shadow")
|
||||||
val shadowC by configurations.creating
|
val shadowC by configurations.creating
|
||||||
|
@ -236,7 +228,7 @@ allprojects {
|
||||||
"kotlinforforge" to rootProject.property("kotlinforforge"),
|
"kotlinforforge" to rootProject.property("kotlinforforge"),
|
||||||
"clothconfig" to rootProject.property("clothconfig_version"),
|
"clothconfig" to rootProject.property("clothconfig_version"),
|
||||||
"fabric_loader" to rootProject.property("fabric_loader_version"),
|
"fabric_loader" to rootProject.property("fabric_loader_version"),
|
||||||
"forge_version" to rootProject.property("forge_version").toString().dropLast(2)
|
"forge_version" to rootProject.property("forge_version").toString().run { substring(0, this.lastIndexOf('.') + 1) }
|
||||||
)
|
)
|
||||||
inputs.properties(modProperties)
|
inputs.properties(modProperties)
|
||||||
filesNotMatching(listOf("*.png")) {
|
filesNotMatching(listOf("*.png")) {
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
architectury { platformSetupLoomIde(); forge() }
|
architectury { platformSetupLoomIde(); forge() }
|
||||||
repositories {
|
repositories {
|
||||||
|
maven(url = "https://maven.neoforged.net/releases/")
|
||||||
maven(url = "https://thedarkcolour.github.io/KotlinForForge/")
|
maven(url = "https://thedarkcolour.github.io/KotlinForForge/")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
forge("net.minecraftforge:forge:${rootProject.architectury.minecraft}-${rootProject.property("forge_version")}.+")
|
forge("net.neoforged:neoforge:${rootProject.property("forge_version").toString().let {
|
||||||
|
return@let if (it.length > 4) it else "$it.+"
|
||||||
|
}}")
|
||||||
implementation("thedarkcolour:kotlinforforge:${rootProject.property("kotlinforforge")}")
|
implementation("thedarkcolour:kotlinforforge:${rootProject.property("kotlinforforge")}")
|
||||||
modApi("me.shedaniel.cloth:cloth-config-forge:${rootProject.property("clothconfig_version")}")
|
modApi("me.shedaniel.cloth:cloth-config-neoforge:${rootProject.property("clothconfig_version")}")
|
||||||
implementation(project(path = ":common", configuration = "namedElements")) { isTransitive = false }
|
implementation(project(path = ":common", configuration = "namedElements")) { isTransitive = false }
|
||||||
add("developmentForge", project(path = ":common")) { isTransitive = false }
|
add("developmentForge", project(path = ":common")) { isTransitive = false }
|
||||||
shadowC(project(path = ":common", configuration = "transformProductionForge")) { isTransitive = false }
|
shadowC(project(path = ":common", configuration = "transformProductionForge")) { isTransitive = false }
|
||||||
}; loom {
|
}; loom {
|
||||||
if (JavaVersion.current().isJava9Compatible) {
|
|
||||||
runs {
|
runs {
|
||||||
val args: MutableList<String> = mutableListOf("-Dfml.earlyprogresswindow=false")
|
val args: MutableList<String> = mutableListOf("-Dfml.earlyprogresswindow=false")
|
||||||
args += if (JavaVersion.current() < JavaVersion.VERSION_17) {
|
args += listOf("--illegal-access=permit")
|
||||||
listOf("--add-exports java.base/sun.security.util=ALL-UNNAMED", "--add-opens java.base/java.util.jar=ALL-UNNAMED")
|
|
||||||
} else listOf("--illegal-access=permit")
|
|
||||||
this.forEach {
|
this.forEach {
|
||||||
it.vmArgs(args)
|
it.vmArgs(args)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,16 +7,16 @@ org.gradle.parallel=true
|
||||||
org.gradle.unsafe.configuration-cache=on
|
org.gradle.unsafe.configuration-cache=on
|
||||||
org.gradle.vfs.watch=true
|
org.gradle.vfs.watch=true
|
||||||
|
|
||||||
minecraft=1.20
|
minecraft=1.21
|
||||||
forge_version=46.0
|
forge_version=21.0.0-beta
|
||||||
kotlinforforge=4.3.0
|
kotlinforforge=5.3.0
|
||||||
kotlinVer=1.8.22
|
kotlinVer=2.0
|
||||||
kotlin_coroutines_version=1.7.1
|
kotlin_coroutines_version=1.7.1
|
||||||
serializationVer=1.5.1
|
serializationVer=1.7.0
|
||||||
fabric_loader_version=0.14.19
|
fabric_loader_version=0.14.20
|
||||||
fabric_language_kotlin=1.9.5+kotlin.1.8.22
|
fabric_language_kotlin=1.11.0+kotlin.2.0.0
|
||||||
fabric_resource_loader_version=0.11.7+f7923f6d27
|
fabric_resource_loader_version=1.1.3+b559734490
|
||||||
fabric_rendering_api_version=3.0.6+b3afc78b27
|
fabric_rendering_api_version=5.0.3+d132107690
|
||||||
fabric_api_base_version=0.4.29+b04edc7a27
|
fabric_api_base_version=0.4.42+6573ed8c90
|
||||||
clothconfig_version=11.0.99
|
clothconfig_version=15.0.127
|
||||||
modmenu_version=7.0.0
|
modmenu_version=11.0.0
|
||||||
|
|
|
@ -2,7 +2,7 @@ pluginManagement {
|
||||||
repositories {
|
repositories {
|
||||||
maven(url = "https://maven.fabricmc.net/")
|
maven(url = "https://maven.fabricmc.net/")
|
||||||
maven(url = "https://maven.architectury.dev/")
|
maven(url = "https://maven.architectury.dev/")
|
||||||
maven(url = "https://maven.minecraftforge.net/")
|
maven(url = "https://maven.neoforged.net/releases/")
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
|
|
Loading…
Reference in New Issue