A shadeable lib used in many of my projects.
- Standard
- Includes all packages and classes.
- Should be updated each Minecraft version
- Forge (append artifact with
:forge
)- Excludes the
tehnut.lib.mc
package. - Only touches Forge classes at the most, so it should be relatively stable across Minecraft versions
- Excludes the
It's a fairly simple process. Just add the following bits of code to your build.gradle
.
-
Directly after you apply all of your plugins, add this
configurations {}
block. If you already have one, add to it.configurations { shade compile.extendsFrom shade }
-
In your
repositories {}
block, addmaven { url "http://tehnut.info/maven" }
. -
In your
dependencies {}
block, addshade "tehnut.lib:LendingLibrary:<MINECRAFT_VERSION>-<LL_VERSION>"
. Replace<MINECRAFT_VERSION>
with the Minecraft version you want. Replace<LL_VERSION>
with the LendingLibrary version you want. -
Add this
reobf {}
block anywhere below theconfigurations {}
block. This will packtehnut.lib
intoyour.package.base.shade.lib
. Make sure to edit the package base to match yours.reobf { jar { extraLines "PK: tehnut/lib your/package/base/shade/lib" } }
-
In your
jar {}
block, add this to exclude theMETA-INF
shipped in LendingLibrary:configurations.shade.each { dep -> from(project.zipTree(dep)) { exclude 'META-INF', 'META-INF/**' } }