SlimJar allows you to download and load up dependencies at runtime as an alternative to shading your dependencies. This helps you reduce the build output size and share downloaded dependencies between projects at client side. It is built mainly with the Gradle ecosystem in mind and is easily configurable, being an almost a drop-in replacement/add-on to Gradle projects.
SlimJar makes the process of switching out jars easier by providing jars that are much smaller in size, all "slimmed" dependencies are already available and do not need to be explicitly moved back to your working directory during an update or change. This can be extremely useful for users who have lower bandwidth connections to push large updates to production or testing environments. It also provides vital features such as package relocation, module isolation, autoconfiguration generation, etc... with the simplicity of minor tweaks in your build file.
// this needs to be ran before you reference your dependencies
ApplicationBuilder.appending("MyApplicationName").build()build.gradle.kts
plugins {
id("com.gradleup.shadow") version "8.3.6"
id("de.crazydev22.slimjar") version "2.0.0"
}
dependencies {
implementation slimjar("2.0.0")
slim("group.id:artifact.id:version")
}
slimJar {
relocate("a.b.c", "m.n.o")
}(For Kotlin DSL, to use the slimjar extension in dependencies block, you will need the following import - import io.github.slimjar.func.slimjar)
git clone https://github.com/CrazyDev05/slimjar.git
# or via
gh repo clone CrazyDev05/slimjar
cd slimjar && ./gradlew test- https://plugins.gradle.org/plugin/de.crazydev22.slimjar
- https://central.sonatype.com/artifact/de.crazydev22.slimjar/runtime
Distributed under the MIT license. See LICENSE for more information.
- Fork it (https://github.com/CrazyDev05/slimjar/fork)
- Create your feature branch (
git checkout -b feature/abcd) - Commit your changes (
git commit -am 'Added some feature abcd') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request