@@ -2,11 +2,20 @@ import util.PropUtil
22
33plugins {
44 id(" multiloader-common" )
5- id(" net.neoforged.moddev " )
5+ id(" fabric-loom " )
66}
77
88// Configure common dependencies
99dependencies {
10+ // Minecraft
11+ minecraft(" com.mojang:minecraft:${ minecraft_version} " )
12+
13+ // Mappings
14+ mappings(loom. layered {
15+ officialMojangMappings()
16+ parchment(" org.parchmentmc.data:parchment-${ parchment_minecraft_version} :${ parchment_version} @zip" )
17+ })
18+
1019 // Mixin
1120 compileOnly(" org.spongepowered:mixin:${ mixin_version} " )
1221
@@ -20,13 +29,13 @@ dependencies {
2029 return annotationProcessor(dep)
2130 break
2231 case " api" : // noinspection DependencyNotationArgument
23- return api (dep)
32+ return modApi (dep)
2433 break
2534 case " con" : // noinspection DependencyNotationArgument
26- return compileOnly (dep)
35+ return modCompileOnly (dep)
2736 break
2837 case " imp" : // noinspection DependencyNotationArgument
29- return implementation (dep)
38+ return modImplementation (dep)
3039 break
3140 case " -" :
3241 return dep
@@ -38,17 +47,19 @@ dependencies {
3847 new PropUtil (project). applyDependencies(project. name, selector)
3948}
4049
41- // Configure ModDevGradle
42- neoForge {
43- neoFormVersion = neoform_version
44- // Apply common AccessTransformer if it exists
45- def at = file(" src/main/resources/META-INF/accesstransformer.cfg" )
46- if (at. exists()) accessTransformers. from(at. absolutePath)
47- validateAccessTransformers = true
48- // Apply Parchment mappings
49- parchment {
50- minecraftVersion = parchment_minecraft_version
51- mappingsVersion = parchment_version
50+ // Configure Loom
51+ loom {
52+ // Apply common AccessWidener if it exists
53+ def aw = project(" :common" ). file(" src/main/resources/${ mod_id} .accesswidener" )
54+ if (aw. exists()) accessWidenerPath. set(aw)
55+ if (aw. exists()) {
56+ validateAccessWidener { accessWidener = aw }
57+ afterEvaluate {
58+ validateAccessWidener. run()
59+ }
60+ }
61+ mixin {
62+ defaultRefmapName. set(" ${ mod_id} .refmap.json" )
5263 }
5364}
5465
0 commit comments