Skip to content

Commit

Permalink
After much pain, switch to shadow for the fabric module
Browse files Browse the repository at this point in the history
  • Loading branch information
2008Choco committed Feb 17, 2024
1 parent 79cd53e commit aae5b28
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ subprojects {
repositories {
mavenCentral()
maven { url = uri("http://repo.choco.wtf/releases"); isAllowInsecureProtocol = true }
maven { url = uri("http://repo.choco.wtf/snapshots"); isAllowInsecureProtocol = true }
}

dependencies {
Expand Down
27 changes: 21 additions & 6 deletions veinminer-fabric/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
plugins {
alias(libs.plugins.fabric.loom)
alias(libs.plugins.shadow)
}

dependencies {
implementation(project(":veinminer-common"))
api(project(":veinminer-common"))
shadow(project(":veinminer-common"))
modApi(libs.choco.networking.fabric)

minecraft(libs.minecraft.get())
mappings(loom.officialMojangMappings())
modImplementation(libs.fabric.loader)

modImplementation(libs.fabric.api)
modImplementation(libs.choco.networking.fabric)

include(project(":veinminer-common"))
include(libs.choco.networking.common)
include(libs.choco.networking.fabric)
}

loom {
Expand All @@ -34,4 +32,21 @@ tasks {
rename { "${it}_${project.name}" }
}
}

shadowJar {
configurations = listOf(project.configurations["shadow"], project.configurations["modApi"])
exclude("META-INF")

dependencies {
include(project(":veinminer-common"))
include(dependency(libs.choco.networking.common.get()))
include(dependency(libs.choco.networking.fabric.get()))
}
}

remapJar {
dependsOn("shadowJar")
mustRunAfter("shadowJar")
inputFile.set(shadowJar.get().archiveFile)
}
}
5 changes: 0 additions & 5 deletions veinminer-fabric/gradle.properties

This file was deleted.

0 comments on commit aae5b28

Please sign in to comment.