# Change Log
# Unreleased (opens new window)
# v9.0.0-beta2 (opens new window) (2024-11-28)
Fixed
- Revert "Migrate SimpleRelocator to using lazy properties" (#1052 (opens new window))
This fixes the relocation not working inv9.0.0-beta1
.
# v9.0.0-beta1 (opens new window) (2024-11-27)
Added
- Add .md support to the Apache License and Notice transformers. (#1041 (opens new window))
Changed
- BREAKING CHANGE: Rewrite this plugin in Kotlin. (#1012 (opens new window))
- BREAKING CHANGE: Migrate
Transformer
s to using lazy properties. (#1036 (opens new window)) - BREAKING CHANGE: Migrate
ShadowJar
to using lazy properties. (#1044 (opens new window))isEnableRelocation
is deprecated, useenableRelocation
instead. - BREAKING CHANGE: Resolve
Configuration
directly inDependencyFilter
. (#1045 (opens new window)) - BREAKING CHANGE: Migrate
SimpleRelocator
to using lazy properties. (#1047 (opens new window))
Removed
- BREAKING CHANGE: Remove Develocity integration. (#1013 (opens new window))
Fixed
- Fix single Log4j2Plugins.dat isn't included into fat jar. (#1039 (opens new window))
# v8.3.5 (opens new window) (2024-11-03)
Fixed
- Revert "Bump Java level to 11" (#1011 (opens new window)).
This reverts the change to maintain compatibility with 8.x versions. The Java level will be bumped to 11 or above in the next major release.
# v8.3.4 (opens new window) (2024-10-29)
Fixed
- Apply legacy plugin last, and declare capabilities for old plugins, fixes #964 (opens new window). (#991 (opens new window))
# v8.3.3 (opens new window) (2024-10-02)
Changed
- Disable Develocity integration by default. (#993 (opens new window))
# v8.3.2 (opens new window) (2024-09-18)
Added
- Support Java 23. (#974 (opens new window))
Changed
ShadowExtension.component
has been deprecated, now you can usecomponent.shadow
instead. (#956 (opens new window))- BREAKING CHANGE: update to jdependency 2.11.0 (opens new window), this requires Java 11 or above to run. (#974 (opens new window))
Fixed
- Stop publishing Shadow self fat jar to Maven repository. (#967 (opens new window))
# v8.3.1 (opens new window) (2024-09-10)
Added
- Apply an empty plugin that has the legacy
com.github.johnrengelman.shadow
plugin ID. This allows existing build logic to keep on reacting to the legacy plugin as the replacement is drop-in currently.
Fixed
- Explicitly add classifier to maven publication. (#904 (opens new window))
- Refix excluding Gradle APIs for java-gradle-plugin. (#948 (opens new window))
# v8.3.0 (opens new window) (2024-08-08)
Changed
- BREAKING CHANGE: the GitHub has been transferred from
johnrengelman/shadow
toGradleUp/shadow
, you can view more details in GradleUp/shadow/issues/908 (opens new window).
We also update the plugin ID fromcom.github.johnrengelman.shadow
tocom.gradleup.shadow
, and the Maven coordinate fromcom.github.johnrengelman:shadow
tocom.gradleup.shadow:shadow-gradle-plugin
. - Bump the min Gradle requirement from
8.0.0
to8.3
. (#876 (opens new window)) - Support Java 21. (#876 (opens new window))
- Use new file permission API from Gradle 8.3. (#876 (opens new window))
Fixed
- Fix for PropertiesFileTransformer breaks Reproducible builds in
8.1.1
. (#858 (opens new window))
# v8.1.1 (opens new window) (2023-03-20)
**NOTE: ** As of this version, the Github repository has migrated to the main
branch as the default branch for releases.
Release Notes (opens new window)
# v8.1.0 (opens new window) (2023-02-26)
BREAKING CHANGE: Due to adoption of the latest version of the com.gradle.plugin-publish
plugin, the maven GAV coordinates have changed as of this version.
The correct coordinates now align with the plugin ID itself: group=com.github.johnrengelman, artifact=shadow, version=<version>
.
For example, classpath("com.github.johnrengelman:shadow:8.1.0")
is the correct configuration for this version.
BREAKING CHANGE: The ConfigureShadowRelocation
task was removed as of this version to better support Gradle configuration caching.
Instead, use the enableRelocation = true
and relocationPrefix = "<new package>"
settings on the ShadowJar
task type.
Release Notes (opens new window)
# v8.0.0 (opens new window) (2023-02-24)
Release Notes (opens new window)
# v7.1.3 (unreleased)
- The GroovyExtensionModuleTransformer now also works for Groovy 2.5+.
# v7.1.2 (2021-12-28)
- Upgrade log4j to 2.17.1 due to CVE-2021-45105 and CVE-2021-44832
# v7.1.1 (2021-12-14)
- Upgrade log4j to 2.16.0 due to CVE-2021-44228 and CVE-2021-45046
# v7.1.0 (2021-10-04)
- BREAKING - The maven coordinates for the plugins have changed as of this version. The proper
group:artifact
isgradle.plugin.com.github.johnrengelman:shadow
- Jeff (opens new window) - Fix
shadowJar
Out-Of-Date with configuration caching #708 (opens new window) - Fiouz (opens new window) - Better support for statically typed languages. This change may require code changes if you are utilizing the Groovy generated getters for properties in some Shadow transformers #706 (opens new window)
- Helder Pereira (opens new window) - Various cleanups #672 (opens new window), #700 (opens new window), #701 (opens new window), #702 (opens new window)
- Roberto Perez Alcolea (opens new window) - Support JVM Toolchains #691 (opens new window)
- mjulianotq (opens new window) - Fix
Project.afterEvaluate
conflicts #675 (opens new window) - Ilya Muradyan (opens new window) - Fix relocation for
ComponentsXmlResourceTransformer
#678 (opens new window) - Vaidotas Valuckas (opens new window) - Fix
JavaExec.main
deprecation #686 (opens new window) - Dmitry Vyazelenko (opens new window) - Support Java 18 with ASM 9.2 #698 (opens new window)
- Jason (opens new window) - Support Records with JDependency 2.7.0 #681 (opens new window)
# v7.0.0 (2021-04-26)
Required Gradle 7.0+
Support for Java 16
Removes JCenter references
Breaking Change! - The maven group coordinate has changed to be
gradle.plugin.com.github.jengelman.gradle.plugins
. Users explicitly declaring the buildscript classpath will need to update their configuration.buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } } dependencies { classpath "gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0" } } apply plugin: "com.gradleup.shadow"
Cédric Champeau (opens new window) - Support Gradle 7 #624 (opens new window)
Daniel Oakey (opens new window) - Close
FileInputStream
when remapping close to avoid classloader locks #642 (opens new window)Maximilian Müller (opens new window) - Groovy error in
ServiceFileTransformer
in Gradle 3 #655 (opens new window)Helder Pereira (opens new window) - Fix deprecations errors in transformers and add CI testing around future deprecations #647 (opens new window)
Nicolas Humblot (opens new window) - Handle deprecation of
mainClassName
configuration #609 (opens new window), #612 (opens new window)Bernie Schelberg (opens new window) - Exclude
api
andimplementations
from legacymaven
POM #615 (opens new window)
# v6.1.0 (2020-10-05)
- As of this version, Shadow is compiled with Java 8 source and target compatibility. This aligns the plugin with the minimum required Java version for Gradle 6.0 (https://docs.gradle.org/6.0/release-notes.html).
- Update ASM to 9.0 to support JDK 16.
- Tim Yates (opens new window), Benedikt Ritter (opens new window) - Enable Configuration Caching for Gradle 6.6+ #591 (opens new window)
- Caleb Larsen (opens new window) - doc updates #583 (opens new window)
- Schalk W. Cronjé (opens new window) - log4j version update for CVE-2020-9488 #590 (opens new window)
- Victor Tso (opens new window) - Input stream handling for large projects #587 (opens new window)
- Matthew Haughton (opens new window) - Implement Task Configuration Avoidance pattern #597 (opens new window)
# v6.0.0 (2020-06-15)
- Required Gradle 6.0+
- NEW: Support for Gradle Metadata publication via the
shadowRuntimeElements
configuration. This is a beta feature the hasn't been tested extensively. Feedback is appreciated. - Fix Gradle 7 deprecation warnings #530 (opens new window)
- Fix to generated start script to correctly use
optsEnvironmentVar
#518 (opens new window) - Yahor Berdnikau (opens new window) - Fix issues with Gradle API being embedded into published JAR #527 (opens new window)
- Dmitry Vyazelenko (opens new window) - ASM updates to support latest Java versions #549 (opens new window)
- ejjcase (opens new window) - Support exposing shadowed project dependencies via POM #543 (opens new window)
- Artem Chubaryan (opens new window) - Performance optimizations #535 (opens new window)
- Trask Stalnaker (opens new window) - Fix exclude patterns on Windows #539 (opens new window)
- Artem Chubaryan (opens new window) - Allow usage of true regex patterns for include/exclude by the
%regex[<pattern>]
syntax #536 (opens new window)
# v5.2.0 (2019-11-10)
- Inez Korczyński (opens new window) - Performance optimization when evaluating relocation paths #507 (opens new window)
- Jeff Adler (opens new window) - Fix remapping issues with multi release JARS #526 (opens new window)
- Gary Hale (opens new window) - Implement support for Gradle build cache #524 (opens new window)
- Roberto Perez Alcolea (opens new window) - Gradle 6.x support #517 (opens new window)
- Konstantin Gribov (opens new window) - Return support for 5.0 for convention mapping #502 (opens new window)
- Lai Jiang (opens new window) - Documentation updates on how to reconfigure
classifier
andversion
#512 (opens new window)
# v5.1.0 (2019-06-29)
- Chris Rankin (opens new window) - Add
ManifestAppenderTransformer
to support appending to Jar manifest #474 (opens new window) - Min-Ken Lai (opens new window) - Additional escaping fixes in start script #487 (opens new window)
- Alan D. Cabrera (opens new window) - Automatically remove
gradleApi
fromcompile
scope in the presence ofshadow
#459 (opens new window) - Christian Stein (opens new window) - Do not initialize
UnusedTracker
when not requested #480 (opens new window), #479 (opens new window) - Attila Kelemen (opens new window) - Fix
NullPointerException
when using java minimization and api project dependency with version #477 (opens new window)
# v5.0.0 (2019-02-28)
- Require Gradle 5.0+
- Fix issue with build classifier
-all
being dropped in Gradle 5.1+ - Roberto Perez Alcolea (opens new window) - Exclude project dependencies from minimization #420 (opens new window)
- Matt King (opens new window), Richard Marbach (opens new window) - Fix escaping in start script #453 (opens new window), #455 (opens new window)
- Dennis Schumann (opens new window) - Fix Gradle 5.2 incompatibility with
ShadowJar.getMetaClass()
#456 (opens new window) - Brane F. Gračnar (opens new window) - Fix compatibility with
com.palantir.docker
#460 (opens new window)
# v4.0.4 (2019-01-19)
- When using
shadow
,application
, andmaven
plugins together, removeshadowDistZip
andshadowDistTar
fromconfigurations.archives
so they are not published or installed by default with theuploadArchives
orinstall
tasks. #347 (opens new window) - James Nelson (opens new window) - Fix
null
path when using Jar minimization and Gradle'sapi
configuration. #424 (opens new window), #425 (opens new window)
# v4.0.3 (2018-11-21)
- Mark Vieira (opens new window) - Don't leak plugin classes to Gradle's Spec cache #430 (opens new window)
# v4.0.2 (2018-10-27)
- Petar Petrov (opens new window) - Update to ASM 7.0-beta and jdependency 2.1.1 to support Java 11, #415 (opens new window)
- Victor Tso (opens new window) - Ensure input streams are closed, #411 (opens new window)
- Osip Fatkullin (opens new window) - Exclude
api
configuration from minimization, #405 (opens new window)
# v4.0.1 (2018-09-30)
- Breaking Change!
Transform.modifyOutputStream(ZipOutputStream os)
toTransform.modifyOutputStream(ZipOutputStream jos, boolean preserveFileTimestamps)
. Typically breaking changes are reserved for major version releases, but this change was necessary forpreserverFileTimestamps
(introduced in v4.0.0) to work correctly in the presence of transformers, #404 (opens new window) - Fix regression in support Java 10+ during relocation, #403 (opens new window)
# v4.0.0 (2018-09-25)
- Breaking Change! Restrict Plugin to Gradle 4.0+. Shadow major versions will align with Gradle major versions going forward.
- Breaking Change! For clarity purposes
com.github.johnrengelman.plugin-shadow
has been removed. If you intend to use this feature, you will need to declare your ownConfigureShadowRelocation
task. See section 2.9.2 (opens new window) of the User Guide - Sergey Tselovalnikov (opens new window) - Upgrade to ASM 6.2.1 to support Java 11
- Chris Cowan (opens new window) - Add support for
shadowJar.preserveFileTimestamps
property. See Jar.preserveFileTimestamps (opens new window) - Paul N. Baker (opens new window) - Add
Log4j2PluginsCacheFileTransformer
to process Log4j DAT files during merge. - Felipe Lima (opens new window) - Fix the long standing "No property
mainClassName
" issue. - debanne (opens new window) - Implement JAR minimization actions. This will attempt to exclude unused classes in your shadowed JAR.
- Configure exclusion of
module-info.class
fromshadowJar
when using the Shadow the Java plugin, #352 (opens new window)
# v2.0.4 (2018-04-27)
- Update to ASM 6.1.1 to address performance issues - ASM Issue 317816 (opens new window)
- Close InputStreams after using them, #364 (opens new window)
- Remove usage of Gradle internal
AbstractFileCollection
. - Add task annotations to remove warnings when validating plugin.
# v2.0.3 (2018-03-24)
- Martin Sadowski (opens new window) - Update to ASM 6.1
- Scott Newson (opens new window) - Fix deprecated Gradle warnings, #356 (opens new window)
# v2.0.2 (2017-12-12)
- Ben Adazza (opens new window), Tyler Benson (opens new window) - documentation
- Marke Vieira (opens new window) - Support multi-project builds with Build-Scan integration
- Upgrade to ASM 6, [#294]https://github.com/GradleUp/shadow/issues/294, #303 (opens new window)
- Rob Spieldenner (opens new window) - Fix integration with
application
plugin in Gradle 4.3, #339 (opens new window) - Fixed deprecation warning from Gradle 4.2+, #326 (opens new window)
# v2.0.1 (2017-06-23)
- Fix
null+configuration
error, #297 (opens new window)
# v2.0.0 (2017-05-09)
- Breaking Change! Restrict Plugin to Gradle 3.0+
- Breaking Change! Build with Java 7
- Breaking Change! Updated
Transformer
interface to acceptTransformerContext
object instead of individual values - Breaking Change! Updated
Relocator
interface to acceptRelocatePathContext
andRelocateClassContext
objects - Breaking Change! Distribution tasks
distShadowZip
anddistShadowTar
have been removed and replaced with the standardshadowDistZip
andshadowDistTar
from the Gradle Distribution plugin. - Breaking Change! The
installShadowApp
task has been removed and replaced with the standardinstallShadowDist
task from the Gradle Distribution plugin. - Breaking Change! The new
installShadowDist
task outputs tobuild/install/<project name>-shadow
per the standard (formerly wasbuild/installShadow
) - Breaking Change!
component.shadow
removed in favor ofproject.shadow.component(publication)
so as to remove dependency on internal Gradle APIs. - NEW Introducing
ConfigureShadowRelocation
task andcom.github.johnrengelman.plugin-shadow
plugin to automatically configure package relocation for Gradle plugins. - NEW Integration with Gradle Build Scans. When running a
ShadowJar
task with Build Scans, custom values including dependencies merged anc package relocations are published in the scan. - Build Shadow w/ Shadow. This will help prevent any future classpath conflicts with Gradle.
- Replace
startShadowScripts
tasks with Gradle's built-inCreateStartScripts
type. - Build with Gradle 3.1
- Marc Philipp (opens new window) - Add
keyTransformer
property toPropertiesFileTransformer
- Update to ASM 5.2
- Piotr Kubowicz (opens new window) - Support
api
,implementation
,runtimeOnly
dependency configurations introdcued in Gradle 3.3
# v1.2.4 (2016-11-03)
- Don't resolve dependency configurations during config phase, #128 (opens new window)
- Build plugin with Gradle 2.14
- Fix docs regarding inheriting Jar manifest, #251 (opens new window)
- Ethan Hall (opens new window) - Support projects that configure uploading to Ivy repositories, #256 (opens new window)
- Force task to depend on dependency configuration, #152 (opens new window)
- Do not explode ZIP files into shadow jar, #196 (opens new window)
- John Szakmeister (opens new window) - Preserve timestamps on merged jar entries, #260 (opens new window)
# v1.2.3 (2016-01-25)
- Support for Gradle 2.11-rc-1, #177 (opens new window)
- Convert internal framework to Gradle TestKit (opens new window)
- Fedor Korotkov (opens new window) - Use BufferedOutputStream when writing the Zip file, #171 (opens new window)
- Haw-Bin Chai (opens new window) - Quote Jar path in Windows start script as it may contain spaces, #170 (opens new window)
- Serban Iordache (opens new window) - Evaluate relocation specs when merging service descriptors, #165 (opens new window)
# v1.2.2 (2015-07-17)
- Minecrell (opens new window) - Gradle 2.5 compatibility, #147 (opens new window)
# v1.2.1 (2015-01-23)
- Apply package relocations to dependency resources, #114 (opens new window)
# v1.2.0 (2014-11-24)
- Re-organize some code to remove need for forcing the Gradle API ClassLoader to allow the
org.apache.tools.zip
package. - Upgrade JDOM library from 1.1 to 2.0.5 (change dependency from
jdom:jdom:1.1
toorg.jdom:jdom2:2.0.5
), #98 (opens new window) - Convert ShadowJar.groovy to ShadowJar.java to workaround binary incompatibility introduced by Gradle 2.2, #106 (opens new window)
- Updated ASM library to
5.0.3
to support JDK8, #97 (opens new window) - Allows for regex pattern matching in the
dependency
string when including/excluding, #83 (opens new window) - Apply package relocations to resource files, #93 (opens new window)
# v1.1.2 (2014-09-09)
- fix bug in
runShadow
where dependencies from theshadow
configuration are not available, #94 (opens new window)
# v1.1.1 (2014-08-27)
- Fix bug in
'createStartScripts'
task that was causing it to not execute'shadowJar'
task, #90 (opens new window) - Do not include
null
in ShadowJar Manifest'Class-Path'
value whenjar
task does not specify a value for it, #92 (opens new window) - ShadowJar Manifest
'Class-Path'
should reference jars from'shadow'
config as relative to location ofshadowJar
output, #91 (opens new window)
# v1.1.0 (2014-08-26)
- Breaking Change! Fix leaking of
shadowJar.manifest
intojar.manifest
, #82 (opens new window) To simplify behavior, theshadowJar.appendManifest
method has been removed. Replace uses withshadowJar.manifest
ShadowTask
now has aconfigurations
property that is resolved to the files in the resolved configuration before being added to the copy spec. This allows for an easier implementation for filtering. The default 'shadowJar' task has the convention of adding the'runtime'
scope to this list. Manually created instances ofShadowTask
have no configurations added by default and can be configured by settingtask.configurations
.- Properly configure integration with the
'maven'
plugin when added. When adding'maven'
the'uploadShadow'
task will now properly configure the POM dependencies by removing the'compile'
and'runtime'
configurations from the POM and adding the'shadow'
configuration as aRUNTIME
scope in the POM. This behavior matches the behavior when using the'maven-publish'
plugin. - Matt Hurne (opens new window) - Allow
ServiceFileTransformer
to specify include/exclude patterns for files within the configured path to merge. - Matt Hurne (opens new window) - Added
GroovyExtensionModuleTransformer
for merging Groovy Extension module descriptor files. The existingServiceFileTransformer
now excludes Groovy Extension Module descriptors by default. distShadowZip
anddistShadowZip
now contain the shadow library and run scripts instead of the default from the'application'
plugin, #89 (opens new window)
# v1.0.3 (2014-07-29)
- Make service files root path configurable for
ServiceFileTransformer
, #72 (opens new window) - [Andres Almiray](https://github.com/aalmiray - Added PropertiesFileTransformer, #73 (opens new window)
- Brandon Kearby (opens new window) - Fixed StackOverflow when a cycle occurs in the resolved dependency grap, #69 (opens new window)
- Apply Transformers to project resources, #70 (opens new window), #71 (opens new window)
- Minecrell (opens new window) - Do not drop non-class files from dependencies when relocation is enabled, #61 (opens new window)
- Remove support for applying individual sub-plugins by Id (easier maintenance and cleaner presentation in Gradle Portal)
# v1.0.2 (2014-07-07)
- Do not add an empty Class-Path attribute to the manifest when the
shadow
configuration contains no dependencies. runShadow
now registersshadowJar
as an input. Previously,runShadow
did not executeshadowJar
and an error occurred.- Support Gradle 2.0, #66 (opens new window)
- Do not override existing 'Class-Path' Manifest attribute settings from Jar configuration. Instead combine, #65 (opens new window)
# v1.0.1 (2014-06-28)
- Fix issue where non-class files are dropped when using relocation, #58 (opens new window)
- Do not create a
/
directory inside the output jar. - Fix
runShadow
task to evaluate theshadowJar.archiveFile
property at execution time, #60 (opens new window)
# v1.0.0 (2014-06-27)
- Previously known as v0.9.0
- All changes from 0.9.0-M1 to 0.9.0-M5
- Properly configure the ShadowJar task inputs to observe the include/excludes from the
dependencies
block. This allows UP-TO-DATE checking to work properly when changing thedependencies
rulea, #54 (opens new window) - Apply relocation remappings to classes and imports in source project, #55 (opens new window)
- Do not create directories in jar for source of remapped class, created directories in jar for destination of remapped classes, #53 (opens new window)
# v0.9.0-M5
- Add commons-io to compile classpath
- Update asm library to 4.1
# v0.9.0-M4
- Break plugin into multiple sub-plugins.
ShadowBasePlugin
is always applied.ShadowJavaPlugin
andShadowApplicationPlugin
are applied in reaction to applying thejava
andapplication
plugins respectively. - Shadow does not applied
java
plugin automatically.java
orgroovy
must be applied in conjunction withshadow
. - Moved artifact filtering to
dependencies {}
block underneathshadowJar
. This allows better include/exclude control for dependencies. - Dependencies added to the
shadow
configuration are automatically added to theClass-Path
attribute in the manifest forshadowJar
- Applying
application
plugin and settingsmainClassName
automatically configures theMain-Class
attribute in the manifest forshadowJar
runShadow
now utilizes the output of theshadowJar
and executes usingjava -jar <shadow jar file>
- Start Scripts for shadow distribution now utilize
java -jar
to execute instead of placing all files on classpath and executing main class. - Excluding/Including dependencies no longer includes transitive dependencies. All dependencies for inclusion/exclusion must be explicitly configured via a spec.
# v0.9.0-M3
- Use commons.io FilenameUtils to determine name of resolved jars for including/excluding
# v0.9.0-M2
- Added integration with
application
plugin to replace oldOutputSignedJars
task - Fixed bug that resulted in duplicate file entries in the resulting Jar
- Changed plugin id to 'com.github.johnrengelman.shadow' to support Gradle 2.x plugin infrastructure.
# v0.9.0-M1
- Rewrite based on Gradle Jar Task
ShadowJar
now extendsJar
- Removed
signedCompile
andsignedRuntime
configurations in favor ofshadow
configuration - Removed
OutputSignedJars
task