Skip to content

Commit

Permalink
build: add legacy fabric except it doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
My-Name-Is-Jeff committed May 2, 2024
1 parent 2d34b7f commit d9903c5
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 9 deletions.
10 changes: 8 additions & 2 deletions mod/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ plugins {

group = "gg.skytils"

val isLegacyFabric = project.platform.isFabric && project.platform.mcVersion == 10809

repositories {
mavenLocal()
mavenCentral()
Expand All @@ -45,9 +47,13 @@ repositories {
includeGroupAndSubgroups("com.github")
}
}
if (isLegacyFabric) maven("https://repo.legacyfabric.net/repository/legacyfabric/")
}

loom {
if (isLegacyFabric) {
intermediaryUrl.set("https://repo.legacyfabric.net/repository/legacyfabric/net/legacyfabric/intermediary/%1\$s/intermediary-%1\$s-v2.jar")
}
silentMojangMappingsLicense()
runConfigs {
getByName("client") {
Expand Down Expand Up @@ -100,14 +106,14 @@ dependencies {
} else {
runtimeOnly("gg.essential:loader-fabric:1.0.0")
}
implementation("gg.essential:essential-$platform:16425+g3a090c5c88") {
implementation("gg.essential:essential-${if (!isLegacyFabric) platform.toString() else "${platform.mcVersionStr}-forge"}:16425+g3a090c5c88") {
exclude(module = "asm")
exclude(module = "asm-commons")
exclude(module = "asm-tree")
exclude(module = "gson")
exclude(module = "vigilance")
}
shadowMe("com.github.Skytils.Vigilance:vigilance-${if (platform.mcVersion >= 11801) "1.18.1-${platform.loaderStr}" else platform.toString()}:afb0909442") {
shadowMe("com.github.Skytils.Vigilance:vigilance-${if (!isLegacyFabric) if (platform.mcVersion >= 11801) "1.18.1-${platform.loaderStr}" else platform.toString() else "${platform.mcVersionStr}-forge"}:afb0909442") {
isTransitive = false
}

Expand Down
8 changes: 3 additions & 5 deletions mod/root.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ version = "2.0.0"

preprocess {
val forge10809 = createNode("1.8.9-forge", 10809, "mcp")
val forge11602 = createNode("1.16.2-forge", 11602, "mcp")
val fabric11602 = createNode("1.16.2-fabric", 11602, "yarn")
val fabric10809 = createNode("1.8.9-fabric", 10809, "yarn")
val fabric12004 = createNode("1.20.4-fabric", 12004, "yarn")

fabric12004.link(fabric11602)
fabric11602.link(forge11602)
forge11602.link(forge10809)
fabric12004.link(fabric10809)
fabric10809.link(forge10809)
}
19 changes: 19 additions & 0 deletions mod/versions/1.8.9-fabric/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# Skytils - Hypixel Skyblock Quality of Life Mod
# Copyright (C) 2020-2024 Skytils
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#

essential.defaults.loom.mappings=net.legacyfabric:yarn:1.8.9+build.541:v2
3 changes: 1 addition & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ project(":mod").apply {
}
listOf(
"1.8.9-forge",
"1.16.2-forge",
"1.16.2-fabric",
"1.8.9-fabric",
"1.20.4-fabric",
).forEach { version ->
include(":mod:$version")
Expand Down

0 comments on commit d9903c5

Please sign in to comment.