Skip to content

Commit 3df6462

Browse files
committed
Refactor build configuration to remove unnecessary shadowing and update mixin settings
1 parent 502e1f9 commit 3df6462

3 files changed

Lines changed: 9 additions & 17 deletions

File tree

common/src/main/resources/examplemod.mixins.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
},
1111
"overwrites": {
1212
"requireAnnotations": true
13-
}
13+
},
14+
"refmap": "${mod_id}.refmap.json"
1415
}

fabric/build.gradle.kts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ plugins {
44
id("fabric-loom")
55
id("maven-publish")
66
kotlin("jvm")
7-
id("com.gradleup.shadow") version "8.3.8"
87
}
98

109
val minecraftVersion: String by project
@@ -54,17 +53,8 @@ dependencies {
5453
// Fabric API. This is technically optional, but you probably want it anyway.
5554
modImplementation("net.fabricmc.fabric-api:fabric-api:${fabricVersion}")
5655
modImplementation("net.fabricmc:fabric-language-kotlin:${fabricKotlinVersion}")
57-
58-
shaded(project(":common"))
59-
}
60-
61-
tasks.shadowJar {
62-
configurations = listOf(shaded)
6356
}
6457

65-
tasks.build {
66-
dependsOn(tasks.shadowJar)
67-
}
6858

6959
val replacements = mapOf(
7060
"minecraft_version" to minecraftVersion,
@@ -90,6 +80,7 @@ tasks.named<ProcessResources>("processResources") {
9080

9181
tasks.withType<JavaCompile>().configureEach {
9282
options.release.set(21)
83+
source(project(":common").sourceSets.main.get().allSource)
9384
}
9485

9586
tasks.withType<KotlinCompile>().configureEach {
@@ -132,4 +123,10 @@ publishing {
132123
// The repositories here will be used for publishing your artifact, not for
133124
// retrieving dependencies.
134125
}
126+
}
127+
128+
loom {
129+
mixin {
130+
defaultRefmapName.set("${modId}.refmap.json")
131+
}
135132
}

neo/build.gradle.kts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,6 @@ dependencies {
174174
// http://www.gradle.org/docs/current/userguide/dependency_management.html
175175
}
176176

177-
jarJar {
178-
dependencies {
179-
implementation(project(":common"))
180-
}
181-
}
182-
183177
tasks.withType<KotlinCompile>().configureEach {
184178
source(project(":common").sourceSets.main.get().allSource)
185179
}

0 commit comments

Comments
 (0)