File tree Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -60,9 +60,14 @@ You shouldn't worry if the reflection or other classes are going to use your mem
6060As long as you don't use them anywhere in your code, they won't initialize.
6161The 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,
6466otherwise your plugin or other plugins will break due to version mismatch.
6567To 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 
108115plugins {
109116    java
110117    id(" com.github.johnrengelman.shadow" " 7.1.2" 
111118}
112119
113120tasks {
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
122143There's always room for improvement. If you know better ways of doing things, I really appreciate it if you can share it with me,
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments