build: use net.neoforged.moddev to build

This commit is contained in:
Puqns67 2024-08-05 14:28:23 +08:00
parent f89e8fa167
commit 57ea4f6daa
Signed by: Puqns67
GPG Key ID: 9669DF042554F536
3 changed files with 24 additions and 13 deletions

View File

@ -16,12 +16,9 @@ fun getVersionType(version: String): String {
}
}
// Need to be set for neoforge
java.toolchain.languageVersion = JavaLanguageVersion.of(javaVersion)
plugins {
id("java")
id("net.neoforged.gradle.userdev") version "7.0.153"
id("net.neoforged.moddev") version "2.0.1-beta"
id("com.modrinth.minotaur") version "2.8.7"
id("idea")
}
@ -31,19 +28,29 @@ base {
version = "${modVersion}+mc${minecraftVersion}"
}
dependencies {
implementation("net.neoforged:neoforge:${loaderVersion}")
}
java {
sourceCompatibility = JavaVersion.valueOf("VERSION_${javaVersion}")
targetCompatibility = JavaVersion.valueOf("VERSION_${javaVersion}")
}
subsystems {
neoForge {
version = loaderVersion
mods {
register(modId) {
sourceSet(sourceSets["main"])
}
}
runs {
create("client") {
client()
}
}
parchment {
minecraftVersion = property("minecraft_version").toString()
mappingsVersion = "2024.07.07"
mappingsVersion = property("parchment_version").toString()
}
}

View File

@ -7,9 +7,10 @@ org.gradle.debug=false
java_version=21
minecraft_version=1.21
minecraft_version_range=[1.21,1.22)
neoforge_version=21.0.76-beta
neoforge_version=21.0.143
neoforge_version_range=[21.0,)
fml_version_range=[2,)
parchment_version=2024.07.28
## Mod Properties
mod_id=skintypefix

View File

@ -1,12 +1,15 @@
pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
mavenCentral()
maven {
name = "Neoforged"
url = uri("https://maven.neoforged.net/releases")
content {
includeGroup("net.neoforged")
}
}
gradlePluginPortal()
mavenCentral()
}
}