remove unused "fabric-like" gradle project
This commit is contained in:
+3
-39
@@ -204,15 +204,6 @@ subprojects { p ->
|
|||||||
developmentForge.extendsFrom coreProjects
|
developmentForge.extendsFrom coreProjects
|
||||||
if (findProject(":neoforge"))
|
if (findProject(":neoforge"))
|
||||||
developmentNeoForge.extendsFrom coreProjects
|
developmentNeoForge.extendsFrom coreProjects
|
||||||
|
|
||||||
// TODO remove unused fabricLike
|
|
||||||
if (findProject(":fabricLike") && p != project(":fabricLike")) {
|
|
||||||
// Shadow fabricLike
|
|
||||||
fabricLike
|
|
||||||
shadowFabricLike
|
|
||||||
compileClasspath.extendsFrom fabricLike
|
|
||||||
runtimeClasspath.extendsFrom fabricLike
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -318,12 +309,6 @@ subprojects { p ->
|
|||||||
// Common
|
// Common
|
||||||
common(project(":common")) { transitive false }
|
common(project(":common")) { transitive false }
|
||||||
shadowCommon(project(":common")) { transitive false }
|
shadowCommon(project(":common")) { transitive false }
|
||||||
|
|
||||||
// FabricLike
|
|
||||||
if (findProject(":fabricLike") && p != project(":fabricLike")) {
|
|
||||||
fabricLike(project(path: ":fabricLike")) { transitive false }
|
|
||||||
shadowFabricLike(project(path: ":fabricLike")) { transitive false }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -333,11 +318,6 @@ subprojects { p ->
|
|||||||
if (isMinecraftSubProject && p != project(":common")) {
|
if (isMinecraftSubProject && p != project(":common")) {
|
||||||
configurations.push(project.configurations.shadowCommon) // Shadow the common subproject
|
configurations.push(project.configurations.shadowCommon) // Shadow the common subproject
|
||||||
relocate "com.seibel.distanthorizons.common", "loaderCommon.${p.name}.com.seibel.distanthorizons.common" // Move the loader files to a different location
|
relocate "com.seibel.distanthorizons.common", "loaderCommon.${p.name}.com.seibel.distanthorizons.common" // Move the loader files to a different location
|
||||||
|
|
||||||
if (findProject(":fabricLike") && p != project(":fabricLike")) {
|
|
||||||
configurations.push(project.configurations.shadowFabricLike) // Shadow the fabricLike subproject
|
|
||||||
relocate "com.seibel.distanthorizons.fabriclike", "loaderCommon.${p.name}.com.seibel.distanthorizons.fabriclike" // Move the loader files to a different location
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
def librariesLocation = "DistantHorizons.libraries"
|
def librariesLocation = "DistantHorizons.libraries"
|
||||||
|
|
||||||
@@ -394,9 +374,6 @@ subprojects { p ->
|
|||||||
// NightConfig (includes Toml & Json)
|
// NightConfig (includes Toml & Json)
|
||||||
relocate "com.electronwill.nightconfig", "${librariesLocation}.electronwill.nightconfig"
|
relocate "com.electronwill.nightconfig", "${librariesLocation}.electronwill.nightconfig"
|
||||||
|
|
||||||
// SVG (not needed atm)
|
|
||||||
// relocate "com.kitfox.svg", "${librariesLocation}.kitfox.svg"
|
|
||||||
|
|
||||||
// Netty
|
// Netty
|
||||||
// Don't relocate, it causes problems with using MC's FriendlyByteBufs
|
// Don't relocate, it causes problems with using MC's FriendlyByteBufs
|
||||||
// relocate "io.netty", "${librariesLocation}.netty"
|
// relocate "io.netty", "${librariesLocation}.netty"
|
||||||
@@ -408,10 +385,10 @@ subprojects { p ->
|
|||||||
|
|
||||||
|
|
||||||
// Put stuff from gradle.properties into the mod info
|
// Put stuff from gradle.properties into the mod info
|
||||||
|
// Note: these resources are only included in the mod jars, the core and API jars don't include these files
|
||||||
processResources {
|
processResources {
|
||||||
def resourceTargets = [ // Location of where to inject the properties
|
def resourceTargets = [ // Location of where to inject the properties
|
||||||
// Holds info like git commit
|
// Holds info like git commit
|
||||||
// TODO: For some reason this script doesnt work with the core project
|
|
||||||
"build_info.json",
|
"build_info.json",
|
||||||
|
|
||||||
// Properties for each of the loaders
|
// Properties for each of the loaders
|
||||||
@@ -421,7 +398,7 @@ subprojects { p ->
|
|||||||
"META-INF/neoforge.mods.toml",
|
"META-INF/neoforge.mods.toml",
|
||||||
|
|
||||||
// The mixins for each of the loaders
|
// The mixins for each of the loaders
|
||||||
"DistantHorizons."+ p.name +".fabricLike.mixins.json"
|
//"DistantHorizons."+ p.name +".fabricLike.mixins.json"
|
||||||
]
|
]
|
||||||
def intoTargets = ["$buildDir/resources/main/"] // Location of the built resources folder
|
def intoTargets = ["$buildDir/resources/main/"] // Location of the built resources folder
|
||||||
|
|
||||||
@@ -505,13 +482,8 @@ subprojects { p ->
|
|||||||
|
|
||||||
|
|
||||||
// ==================== Delete un-needed files ====================
|
// ==================== Delete un-needed files ====================
|
||||||
exclude "DistantHorizons.fabricLike.mixins.json" // This isnt required atm, but we will be using it later
|
|
||||||
|
|
||||||
// exclude "*.distanthorizons.accesswidener"
|
|
||||||
//// include "${accessWidenerVersion}.distanthorizons.accesswidener"
|
|
||||||
|
|
||||||
// Jank solution to remove all unused accesswideners
|
// Jank solution to remove all unused accesswideners
|
||||||
// The line above would work..., except that (neo)forge (well, mainly architectury) requires the original accesswidener file, meaning we require this jank solution to keep it
|
// (neo)forge (well, mainly architectury) requires the original accesswidener file, meaning we require this jank solution to keep it
|
||||||
exclude { file ->
|
exclude { file ->
|
||||||
if (file.name.contains(".distanthorizons.accesswidener") && file.name != "${accessWidenerVersion}.distanthorizons.accesswidener") {
|
if (file.name.contains(".distanthorizons.accesswidener") && file.name != "${accessWidenerVersion}.distanthorizons.accesswidener") {
|
||||||
return true
|
return true
|
||||||
@@ -699,14 +671,6 @@ allprojects { p ->
|
|||||||
from project(":common").file("src/main/resources/${accessWidenerVersion}.distanthorizons.accesswidener")
|
from project(":common").file("src/main/resources/${accessWidenerVersion}.distanthorizons.accesswidener")
|
||||||
into(file(p.file("build/resources/main")))
|
into(file(p.file("build/resources/main")))
|
||||||
rename "${accessWidenerVersion}.distanthorizons.accesswidener", "distanthorizons.accesswidener"
|
rename "${accessWidenerVersion}.distanthorizons.accesswidener", "distanthorizons.accesswidener"
|
||||||
|
|
||||||
|
|
||||||
// Move the fabricLike mixin to its different places for each subproject
|
|
||||||
if (findProject(":fabricLike")) {
|
|
||||||
from project(":fabricLike").file("src/main/resources/DistantHorizons.fabricLike.mixins.json")
|
|
||||||
into(file(p.file("build/resources/main")))
|
|
||||||
rename "DistantHorizons.fabricLike.mixins.json", "DistantHorizons." + p.name + ".fabricLike.mixins.json"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task copyCoreResources(type: Copy) {
|
task copyCoreResources(type: Copy) {
|
||||||
|
|||||||
+1
-5
@@ -4,7 +4,6 @@ pluginManagement {
|
|||||||
name "Fabric"
|
name "Fabric"
|
||||||
url "https://maven.fabricmc.net/"
|
url "https://maven.fabricmc.net/"
|
||||||
}
|
}
|
||||||
// TODO: Stop using Forge for versions with NeoForged
|
|
||||||
maven {
|
maven {
|
||||||
name "Forge"
|
name "Forge"
|
||||||
url "https://maven.minecraftforge.net/"
|
url "https://maven.minecraftforge.net/"
|
||||||
@@ -18,7 +17,7 @@ pluginManagement {
|
|||||||
url "https://maven.neoforged.net/snapshots/"
|
url "https://maven.neoforged.net/snapshots/"
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
name "Architectury (Better Forge because regular Forge is annoying)" // TODO: Once we switch to NeoForge, would it's gradle work better? or will it have Forge's problems in it
|
name "Architectury"
|
||||||
url "https://maven.architectury.dev/"
|
url "https://maven.architectury.dev/"
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
@@ -150,9 +149,6 @@ for (loader in ((String) gradle.builds_for).split(",")) {
|
|||||||
println "Adding loader " + loaderName
|
println "Adding loader " + loaderName
|
||||||
include(loaderName)
|
include(loaderName)
|
||||||
}
|
}
|
||||||
// TODO remove unused fabricLike
|
|
||||||
//if (gradle.builds_for.contains("fabric") || gradle.builds_for.contains("quilt"))
|
|
||||||
// include("fabricLike")
|
|
||||||
|
|
||||||
|
|
||||||
rootProject.name = "DistantHorizons"
|
rootProject.name = "DistantHorizons"
|
||||||
|
|||||||
Reference in New Issue
Block a user