You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.4 KiB
Plaintext
29 lines
1.4 KiB
Plaintext
:tests: ../../test/groovy/org/xbib/gradle/plugin/shadow
|
|
== Introduction
|
|
|
|
Shadow is a Gradle plugin for combining dependency classes and resources with a project's into a single
|
|
output Jar.
|
|
The combined Jar is often referred to a __fat-jar__ or __uber-jar__.
|
|
Shadow utilizes `JarInputStream` and `JarOutputStream` to efficiently process dependent libraries
|
|
into the output jar without incurring the I/O overhead of expanding the jars to disk.
|
|
|
|
=== Benefits of Shadow
|
|
|
|
Shadowing a project output has a major use case:
|
|
|
|
. Bundling and relocating common dependencies in libraries to avoid classpath conflicts
|
|
|
|
==== Bundling
|
|
|
|
Dependency bundling and relocation is the main use case for __library__ authors.
|
|
The goal of a bundled library is to create a pre-packaged dependency for other libraries or applications to utilize.
|
|
Often in these scenarios, a library may contain a dependency that a downstream library or application also uses.
|
|
In __some__ cases, different versions of this common dependency can cause an issue in either the upstream library or
|
|
the downstream application.
|
|
These issues often manifest themselves as binary incompatibilities in either the library or application code.
|
|
|
|
By utilizing Shadow's ability to __relocate__ the package names for dependencies, a library author can ensure that the
|
|
library's dependencies will not conflict with the same dependency being declared by the downstream application.
|
|
|
|
include::01-getting-started.adoc[]
|