Skip to content

Commit 7c5c461

Browse files
committed
simplify shadow exclude
1 parent 3bb340f commit 7c5c461

1 file changed

Lines changed: 18 additions & 10 deletions

File tree

build.gradle.kts

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,28 @@ repositories {
2626
dependencies {
2727
zenithProxy("com.zenith:ZenithProxy:$mc-SNAPSHOT")
2828

29-
// you can include dependencies by shading
29+
/** to include dependencies into your plugin jar **/
3030
// shade("com.github.ben-manes.caffeine:caffeine:3.2.0")
3131
}
3232

3333
tasks {
3434
shadowJar {
35-
// relocate shaded dependencies to avoid conflicts with other plugins
36-
// transitive dependencies should also be relocated
37-
// build and examine your plugin jar contents to check
38-
39-
// relocate("com.github.benmanes.caffeine", "${project.group}.shadow.caffeine")
40-
41-
// remove unneeded dependencies by jar folder path
42-
// exclude("com/google/errorprone/**")
43-
// exclude("org/jspecify/**")
35+
/**
36+
* relocate shaded dependencies to avoid conflicts with other plugins
37+
* transitive dependencies should also be relocated or removed (with exclude)
38+
* build and examine your plugin jar contents to check
39+
* https://gradleup.com/shadow/configuration/relocation/
40+
*/
41+
// val basePackage = "${project.group}.shadow"
42+
// relocate("com.github.benmanes.caffeine", "$basePackage.caffeine")
43+
44+
/**
45+
* remove unneeded transitive dependencies
46+
* https://gradleup.com/shadow/configuration/dependencies/#filtering-dependencies
47+
*/
48+
// dependencies {
49+
// exclude(dependency(":error_prone_annotations:.*"))
50+
// exclude(dependency(":jspecify:.*"))
51+
// }
4452
}
4553
}

0 commit comments

Comments
 (0)