Revert "feat(lom): initial NeoForge support (untested)"
This reverts commit ac475465ce
.
This commit is contained in:
parent
ac475465ce
commit
748a359fb6
|
@ -14,12 +14,4 @@ repositories {
|
||||||
name = "Fabric"
|
name = "Fabric"
|
||||||
url = uri("https://maven.fabricmc.net/")
|
url = uri("https://maven.fabricmc.net/")
|
||||||
}
|
}
|
||||||
maven {
|
|
||||||
name = "Architectury"
|
|
||||||
url = uri("https://maven.architectury.dev/")
|
|
||||||
}
|
|
||||||
maven {
|
|
||||||
name = "Forge"
|
|
||||||
url = uri("https://files.minecraftforge.net/maven/")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
plugins {
|
plugins {
|
||||||
jf.`plugin-conventions`
|
id("jf.plugin-conventions")
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("org.eclipse.jgit:org.eclipse.jgit:6.8.0.202311291450-r")
|
implementation("org.eclipse.jgit:org.eclipse.jgit:6.5.0.202303070854-r")
|
||||||
implementation("com.squareup:javapoet:1.13.0")
|
implementation("com.squareup:javapoet:1.13.0")
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
plugins {
|
plugins {
|
||||||
jf.`plugin-conventions`
|
id("jf.plugin-conventions")
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(projects.lom)
|
api(project(":lom"))
|
||||||
implementation("com.modrinth.minotaur:Minotaur:2.8.7")
|
implementation("com.modrinth.minotaur:Minotaur:2.8.0")
|
||||||
implementation("io.github.CDAGaming:CurseGradle:1.6.1")
|
implementation("io.github.CDAGaming:CurseGradle:1.6.1")
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ fun Project.legacyCheck(jfMod: JfModExtension) {
|
||||||
}
|
}
|
||||||
if (hasProperty("loader_version")) {
|
if (hasProperty("loader_version")) {
|
||||||
logger.warn("Using loader_version is deprecated, please use the DSL")
|
logger.warn("Using loader_version is deprecated, please use the DSL")
|
||||||
jfMod.fabricLoaderVersion.set(prop("loader_version"))
|
jfMod.loaderVersion.set(prop("loader_version"))
|
||||||
}
|
}
|
||||||
if (hasProperty("yarn_mappings")) {
|
if (hasProperty("yarn_mappings")) {
|
||||||
logger.warn("Using yarn_mappings is deprecated, please use the DSL")
|
logger.warn("Using yarn_mappings is deprecated, please use the DSL")
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
plugins {
|
plugins {
|
||||||
jf.`plugin-conventions`
|
id("jf.plugin-conventions")
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(projects.convention)
|
api(project(":convention"))
|
||||||
api("dev.architectury.loom:dev.architectury.loom.gradle.plugin:1.5-SNAPSHOT")
|
api("net.fabricmc:fabric-loom:1.5-SNAPSHOT")
|
||||||
api("com.github.johnrengelman:shadow:8.1.1")
|
api("com.github.johnrengelman:shadow:8.1.1")
|
||||||
}
|
}
|
|
@ -16,22 +16,17 @@ interface LomExtension {
|
||||||
}
|
}
|
||||||
|
|
||||||
val minecraftVersion: Property<String>
|
val minecraftVersion: Property<String>
|
||||||
val fabricLoaderVersion: Property<String>
|
val loaderVersion: Property<String>
|
||||||
val neoforgeVersion: Property<String>
|
|
||||||
|
|
||||||
fun check(proj: Project) {
|
fun check(proj: Project) {
|
||||||
yarnBuild.finalizeValue()
|
yarnBuild.finalizeValue()
|
||||||
minecraftVersion.finalizeValue()
|
minecraftVersion.finalizeValue()
|
||||||
fabricLoaderVersion.finalizeValue()
|
loaderVersion.finalizeValue()
|
||||||
neoforgeVersion.finalizeValue()
|
|
||||||
require(!(fabricLoaderVersion.isPresent && neoforgeVersion.isPresent)) { "fabricLoaderVersion and forgeVersion are mutually exclusive" }
|
|
||||||
require(fabricLoaderVersion.isPresent || neoforgeVersion.isPresent) { "fabricLoaderVersion or forgeVersion must be set" }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun copyFrom(ext: LomExtension) {
|
fun copyFrom(ext: LomExtension) {
|
||||||
yarnBuild.set(ext.yarnBuild)
|
yarnBuild.set(ext.yarnBuild)
|
||||||
minecraftVersion.set(ext.minecraftVersion)
|
minecraftVersion.set(ext.minecraftVersion)
|
||||||
fabricLoaderVersion.set(ext.fabricLoaderVersion)
|
loaderVersion.set(ext.loaderVersion)
|
||||||
neoforgeVersion.set(ext.neoforgeVersion)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -7,7 +7,7 @@ plugins {
|
||||||
id("jf.java")
|
id("jf.java")
|
||||||
idea
|
idea
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
id("dev.architectury.loom")
|
id("fabric-loom")
|
||||||
id("com.github.johnrengelman.shadow")
|
id("com.github.johnrengelman.shadow")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@ val devlibs = project.layout.buildDirectory.dir("devlibs").get().asFile
|
||||||
loom {
|
loom {
|
||||||
runtimeOnlyLog4j.set(true)
|
runtimeOnlyLog4j.set(true)
|
||||||
splitEnvironmentSourceSets()
|
splitEnvironmentSourceSets()
|
||||||
silentMojangMappingsLicense()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create testmod source set with access to main and client classpaths
|
// Create testmod source set with access to main and client classpaths
|
||||||
|
@ -85,12 +84,8 @@ earlyAfterEvaluate {
|
||||||
minecraft("com.mojang:minecraft:${args.minecraftVersion.get()}")
|
minecraft("com.mojang:minecraft:${args.minecraftVersion.get()}")
|
||||||
if (args.yarnBuild.isPresent) mappings("net.fabricmc:yarn:${args.minecraftVersion.get()}+${args.yarnBuild.get()}:v2")
|
if (args.yarnBuild.isPresent) mappings("net.fabricmc:yarn:${args.minecraftVersion.get()}+${args.yarnBuild.get()}:v2")
|
||||||
else loom.officialMojangMappings()
|
else loom.officialMojangMappings()
|
||||||
if (!hasProperty("loom.platform") || property("loom.platform") == "fabric") {
|
modImplementation("net.fabricmc:fabric-loader:${args.loaderVersion.get()}")
|
||||||
modImplementation("net.fabricmc:fabric-loader:${args.fabricLoaderVersion.get()}")
|
testImplementation("net.fabricmc:fabric-loader-junit:${args.loaderVersion.get()}")
|
||||||
testImplementation("net.fabricmc:fabric-loader-junit:${args.fabricLoaderVersion.get()}")
|
|
||||||
} else if (property("loom.platform") == "neoforge") {
|
|
||||||
"neoForge"("net.minecraftforge:forge:${args.minecraftVersion.get()}-${args.neoforgeVersion.get()}")
|
|
||||||
}
|
|
||||||
|
|
||||||
testmodImplementation(sourceSets.main.get().output)
|
testmodImplementation(sourceSets.main.get().output)
|
||||||
testmodImplementation(sourceSets.client.get().output)
|
testmodImplementation(sourceSets.client.get().output)
|
||||||
|
@ -154,10 +149,9 @@ tasks.remapJar {
|
||||||
|
|
||||||
// fill in mod version
|
// fill in mod version
|
||||||
tasks.processResources {
|
tasks.processResources {
|
||||||
filesMatching(listOf("fabric.mod.json", "META-INF/mods.toml")) {
|
filesMatching("fabric.mod.json") {
|
||||||
expand(mapOf("version" to project.versionS))
|
expand(mapOf("version" to project.versionS))
|
||||||
}
|
}
|
||||||
inputs.property("version", project.versionS)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// publish sources jar and remapped jar without JiJ'd deps
|
// publish sources jar and remapped jar without JiJ'd deps
|
||||||
|
|
|
@ -3,5 +3,3 @@ rootProject.name = "scripts"
|
||||||
include("lom")
|
include("lom")
|
||||||
include("convention")
|
include("convention")
|
||||||
include("jfmod")
|
include("jfmod")
|
||||||
|
|
||||||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
|
||||||
|
|
Loading…
Reference in New Issue