Skip to content

Commit bcb368a

Browse files
committed
Update README.md
1 parent ac90246 commit bcb368a

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,14 @@ You shouldn't worry if the reflection or other classes are going to use your mem
6060
As long as you don't use them anywhere in your code, they won't initialize.
6161
The memory usage of these utilities are extremely enhanced.
6262

63-
**Note:** DO NOT extract the JAR into your project if you're using maven. You have to shade the library,
63+
# Shading
64+
65+
DO NOT extract the JAR into your project if you're using maven. You have to shade the library,
6466
otherwise your plugin or other plugins will break due to version mismatch.
6567
To shade the library, add the following under your maven plugins:
68+
69+
### [Apache Maven Shade Plugin](https://maven.apache.org/plugins/maven-shade-plugin/)
70+
6671
```xml
6772
<plugin>
6873
<groupId>org.apache.maven.plugins</groupId>
@@ -103,20 +108,36 @@ To shade the library, add the following under your maven plugins:
103108
</plugin>
104109
```
105110

106-
Gradle
111+
### [Gradle Shadow plugin](https://imperceptiblethoughts.com/shadow/)
112+
113+
Gradle (Kotlin DSL)
107114
```kotlin
108115
plugins {
109116
java
110117
id("com.github.johnrengelman.shadow") version ("7.1.2")
111118
}
112119

113120
tasks {
114-
named<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("shadowJar") {
121+
shadowJar {
115122
relocate("com.cryptomorin.xseries", "my.plugin.utils")
116123
}
117124
}
118125
```
119126

127+
Gradle (Groovy)
128+
```groovy
129+
plugins {
130+
id 'com.github.johnrengelman.shadow' version '7.1.2'
131+
id 'java'
132+
}
133+
134+
tasks {
135+
shadowJar {
136+
relocate 'com.cryptomorin.xseries', 'my.plugin.utils'
137+
}
138+
}
139+
```
140+
120141
### Contributing
121142

122143
There's always room for improvement. If you know better ways of doing things, I really appreciate it if you can share it with me,

0 commit comments

Comments
 (0)