@@ -4,41 +4,52 @@ plugins {
44}
55
66dependencies {
7- shadow (" org.apache.commons:commons-math4-core:4.0-beta1" )
8- shadow (" com.github.ben-manes.caffeine:caffeine:3.2.2" )
9- shadow (" com.github.Chronoken:EffectLib:1da888c" )
10- shadow (" org.incendo:cloud-paper:2.0.0-beta.16" )
11- shadow (" org.incendo:cloud-minecraft-extras:2.0.0-beta.16" )
12- shadow (" org.incendo:cloud-processors-requirements:1.0.0-rc.1" )
13- shadow (" org.bstats:bstats-bukkit:3.2.1" )
14- shadow (" com.github.ezylang:EvalEx:3.6.2" )
7+ implementation (" org.apache.commons:commons-math4-core:4.0-beta1" )
8+ implementation (" com.github.ben-manes.caffeine:caffeine:3.2.2" )
9+ implementation (" com.github.Chronoken:EffectLib:1da888c" )
10+ implementation (" org.incendo:cloud-paper:2.0.0-beta.16" )
11+ implementation (" org.incendo:cloud-minecraft-extras:2.0.0-beta.16" )
12+ implementation (" org.incendo:cloud-processors-requirements:1.0.0-rc.1" )
13+ implementation (" org.bstats:bstats-bukkit:3.2.1" )
14+ implementation (" com.github.ezylang:EvalEx:3.6.2" )
1515
16- shadow (" org.antlr:antlr4-runtime:4.13.2" )
16+ implementation (" org.antlr:antlr4-runtime:4.13.2" )
1717 antlr(" org.antlr:antlr4:4.13.2" )
1818
19- shadow (project(path : " :nms:shared" , configuration : " apiElements " ))
20- shadow (project(path : " :nms:latest" )) { transitive = false }
21- shadow (project(path : " :nms:v26_1_2" )) { transitive = false }
19+ implementation (project(path : " :nms:shared" ))
20+ implementation (project(path : " :nms:latest" ))
21+ implementation (project(path : " :nms:v26_1_2" ))
2222
23- implementation(" com.github.retrooper:packetevents-spigot:2.11.2" )
24- implementation(" net.dmulloy2:ProtocolLib:5.4.0" ) { transitive = false }
25- implementation(" me.libraryaddict.disguises:libsdisguises:11.0.16-SNAPSHOT" ) { transitive = false }
26- implementation(" net.milkbowl.vault:VaultAPI:1.7" ) { transitive = false }
27- implementation(" me.clip:placeholderapi:2.12.2" ) { transitive = false }
28- implementation(" com.github.GriefPrevention:GriefPrevention:18.0.0" ) { transitive = false }
29- implementation(" com.sk89q.worldguard:worldguard-core:7.1.0-SNAPSHOT" ) { transitive = false }
30- implementation(" com.sk89q.worldguard:worldguard-bukkit:7.1.0-SNAPSHOT" ) { transitive = false }
31- implementation(" com.sk89q.worldedit:worldedit-core:7.4.0-SNAPSHOT" ) { transitive = false }
32- implementation(" com.sk89q.worldedit:worldedit-bukkit:7.4.0-SNAPSHOT" ) { transitive = false }
23+ compileOnly(" com.github.retrooper:packetevents-spigot:2.11.2" )
24+ compileOnly(" net.dmulloy2:ProtocolLib:5.4.0" )
25+ compileOnly(" me.libraryaddict.disguises:libsdisguises:11.0.16-SNAPSHOT" )
26+ compileOnly(" net.milkbowl.vault:VaultAPI:1.7" )
27+ compileOnly(" me.clip:placeholderapi:2.12.2" )
28+ compileOnly(" com.github.GriefPrevention:GriefPrevention:18.0.0" )
29+ compileOnly(" com.sk89q.worldguard:worldguard-core:7.1.0-SNAPSHOT" )
30+ compileOnly(" com.sk89q.worldguard:worldguard-bukkit:7.1.0-SNAPSHOT" )
31+ compileOnly(" com.sk89q.worldedit:worldedit-core:7.4.0-SNAPSHOT" )
32+ compileOnly(" com.sk89q.worldedit:worldedit-bukkit:7.4.0-SNAPSHOT" )
33+ }
34+
35+ /*
36+ * Undo extendsFrom relationship between the 'antlr' configuration and the 'api' configuration,
37+ * causing Shadow to shade it. See:
38+ * https://github.com/gradle/gradle/blob/fe863b559778fb57e926f55c2162bd17f153c637/platforms/jvm/antlr/src/main/java/org/gradle/api/plugins/antlr/AntlrPlugin.java#L70
39+ *
40+ * Workaround by: https://github.com/gradle/gradle/issues/820#issuecomment-3491381422
41+ */
42+ configurations {
43+ api {
44+ extendsFrom = extendsFrom. findAll { it != configurations. antlr }
45+ }
3346}
3447
3548base {
3649 archivesName = " MagicSpells"
3750}
3851
3952shadowJar {
40- configurations = [project. configurations. shadow]
41-
4253 relocate(" com.github.benmanes.caffeine" , " com.nisovin.magicspells.shaded.com.github.benmanes.caffeine" )
4354 relocate(" org.apache.commons.math4" , " com.nisovin.magicspells.shaded.org.apache.commons.math4" )
4455 relocate(" de.slikey.effectlib" , " com.nisovin.magicspells.shaded.effectlib" )
@@ -64,7 +75,11 @@ shadowJar {
6475}
6576
6677jar {
67- enabled = false
78+ destinationDirectory = layout. buildDirectory. dir(" publication" )
79+ }
80+
81+ shadow {
82+ addShadowVariantIntoJavaComponent = false
6883}
6984
7085generateGrammarSource {
@@ -75,7 +90,7 @@ generateGrammarSource {
7590publishing {
7691 publications {
7792 maven(MavenPublication ) {
78- from components. shadow
93+ from components. java
7994 }
8095 }
8196}
0 commit comments