Skip to content

Releases: GradleUp/shadow

8.3.9

05 Aug 01:53
2adc2d7
Compare
Choose a tag to compare

Warning

Only Gradle 9 support is being backported to this version. No additional features or crucial bug fixes will be included in the 8.x line. Please migrate to Shadow 9 as soon as possible.

Changed

  • Use BufferedOutputStream when writing the Zip file to improve performance. (#1579)

9.0.0-rc3

01 Aug 01:15
39d1869
Compare
Choose a tag to compare

Important

This release is a major update from the 8.3.x series. The plugin has been fully rewritten in Kotlin, bringing significant improvements to maintainability, performance, and future extensibility. It introduces many new features, enhancements, and bug fixes, and includes several breaking changes. Please review the changelog carefully and consult the new doc site before upgrading.

Added

  • Add PreserveFirstFoundResourceTransformer. (#1548)
    This is useful when you set shadowJar.duplicatesStrategy = DuplicatesStrategy.INCLUDE (the default behavior) and want to ensure that only the first found resource is included in the final JAR.
  • Fail build if the ZIP entries in the shadowed JAR are duplicate. (#1552)
    This feature is controlled by the shadowJar.failOnDuplicateEntries property, which is false by default.
    Related to setting duplicatesStrategy = DuplicatesStrategy.FAIL but there are some differences:
    • It only checks the entries in the shadowed jar, not the input files.
    • It works with setting duplicatesStrategy to any value.
    • It provides a more strict check before the JAR is created.

Changed

  • BREAKING CHANGE: Rename ShadowJar's enableRelocation to enableAutoRelocation. (#1541)
    The Command Line options are also updated:
    --enable-auto-relocation          Enables auto relocation of packages in the dependencies.
    --no-enable-auto-relocation       Disables option --enable-auto-relocation.
    --fail-on-duplicate-entries       Fails build if the ZIP entries in the shadowed JAR are duplicate.
    --no-fail-on-duplicate-entries    Disables option --fail-on-duplicate-entries.
    --minimize-jar                    Minimizes the jar by removing unused classes.
    --no-minimize-jar                 Disables option --minimize-jar.
    --relocation-prefix               Prefix used for auto relocation of packages in the dependencies.
    --rerun                           Causes the task to be re-run even if up-to-date.
    
  • Mark Action parameters as non-null. (#1555)

Removed

  • Remove JVM default compat stuff. (#1556)

9.0.0-rc2

23 Jul 09:21
47a9313
Compare
Choose a tag to compare

Important

This release is a major update from the 8.3.x series. The plugin has been fully rewritten in Kotlin, bringing significant improvements to maintainability, performance, and future extensibility. It introduces many new features, enhancements, and bug fixes, and includes several breaking changes. Please review the changelog carefully and consult the new doc site before upgrading.

Added

  • Support skipping string constant remapping. (#1401)
  • Let assemble depend on shadowJar. (#1524)
  • Fail build when inputting AAR files or using Shadow with AGP. (#1530)

Changed

  • Restore Develocity Build Scan integration. (#1505)
    It is still disabled by default, you can enable it by setting com.gradleup.shadow.enableDevelocityIntegration = true.
  • Expose AbstractDependencyFilter from internal to public. (#1538)
    You can access it via com.github.jengelman.gradle.plugins.shadow.tasks.DependencyFilter.AbstractDependencyFilter.

Fixed

  • Honor options.release for target JVM attribute. (#1502)

9.0.0-rc1

02 Jul 11:01
52295cf
Compare
Choose a tag to compare

Important

This release is a major update from the 8.3.x series. The plugin has been fully rewritten in Kotlin, bringing significant improvements to maintainability, performance, and future extensibility. It introduces many new features, enhancements, and bug fixes, and includes several breaking changes. Please review the changelog carefully and consult the new doc site before upgrading.

Added

  • Add .md support to the Apache License and Notice transformers. (#1041)
  • Sync SimpleRelocator changes from maven-shade-plugin. (#1076)
  • Support configuring separator in AppendingTransformer. (#1169)
    This is useful for handling files like resources/application.yml.
  • Exclude module-info.class in Multi-Release folders by default. (#1177)
  • Inject TargetJvmVersion attribute for Gradle Module Metadata. (#1199)
  • Sync ShadowApplicationPlugin with ApplicationPlugin. (#1224)
  • Inject Multi-Release manifest attribute if any dependency contains it. (#1239)
  • Mark Transformer as throwing IOException. (#1248)
  • Compat Kotlin Multiplatform plugin. (#1280)
  • Add Kotlin DSL examples in docs. (#1306)
  • Support using type-safe dependency accessors in ShadowJar.dependencies. (#1322)
  • Support command line options for ShadowJar. (#1365)
    --enable-relocation       Enable relocation of packages in the jar
    --no-enable-relocation    Disables option --enable-relocation
    --minimize-jar            Minimize the jar by removing unused classes
    --no-minimize-jar         Disables option --minimize-jar
    --relocation-prefix       Prefix to use for relocated packages
    --rerun                   Causes the task to be re-run even if up-to-date
    

Changed

  • BREAKING CHANGE: Rewrite this plugin in Kotlin. (#1012)
  • BREAKING CHANGE: Migrate Transformers to using lazy properties. (#1036)
  • BREAKING CHANGE: Migrate ShadowJar to using lazy properties. (#1044)
  • BREAKING CHANGE: ShadowJar's isEnableRelocation has been renamed to enableRelocation. (#1044)
  • BREAKING CHANGE: Resolve Configuration directly in DependencyFilter. (#1045)
  • BREAKING CHANGE: Migrate SimpleRelocator to using lazy properties. (#1047)
  • BREAKING CHANGE: Some public getters have been updated in SimpleRelocator. (#1079)
  • BREAKING CHANGE: Migrate all ListProperty usages to SetProperty. (#1103)
    Some public List parameters are also changed to Set.
  • BREAKING CHANGE: Mark RelocatorRemapper as internal. (#1227)
  • BREAKING CHANGE: Bump min Java requirement to 11. (#1242)
  • BREAKING CHANGE: Move tracking unused classes logic out of ShadowCopyAction. (#1257)
  • Reduce duplicated SimpleRelocator to improve performance. (#1271)
  • BREAKING CHANGE: Move DependencyFilter into tasks package. (#1272)
  • BREAKING CHANGE: Change the default duplicatesStrategy from EXCLUDE to INCLUDE. (#1233)
    • ShadowJar recognized DuplicatesStrategy.EXCLUDE as the default, but the other strategies didn't work properly.
    • Now ShadowJar honors DuplicatesStrategy.INCLUDE as the default, and align all the strategy behaviors with the Gradle side.
  • BREAKING CHANGE: Align the behavior of ShadowTask.from with Gradle's AbstractCopyTask.from. (#1233)
    In the previous versions, ShadowTask.from would always unzip the files before processing them, which caused serial
    issues that are hard to fix. Now it behaves like Gradle's AbstractCopyTask.from, which means it will not unzip
    the files, only copy the files as-is. If you still want to shadow the unzipped files, try out something like:
      tasks.shadowJar {
        from(zipTree(files('path/to/your/file.zip')))
      }
    or
      dependencies {
        implementation(files('path/to/your/file.zip'))
      }
  • BREAKING CHANGE: Rename Transformer to ResourceTransformer. (#1288)
    Aims to better align with the name org.apache.maven.plugins.shade.resource.ResourceTransformer.java
    and to distinguish itself from org.gradle.api.Transformer.java.
  • BREAKING CHANGE: Mark DefaultInheritManifest as internal. (#1303)
  • BREAKING CHANGE: Polish ShadowSpec. (#1307)
    • Return values of ShadowSpec functions are changed to Unit to avoid confusion.
    • ShadowSpec no longer extends CopySpec.
    • Overload relocate, transform and things for better usability in Kotlin.
  • BREAKING CHANGE: Remove redundant types from function returning. (#1308)
  • Replace deprecated SelfResolvingDependency with FileCollectionDependency. (#1114)
  • Update start script templates. (#1183)
  • Mark more Transformers cacheable. (#1210)
  • Mark ShadowJar.dependencyFilter as @Input. (#1206)
  • Polish startShadowScripts task registering. (#1216)
  • Refactor file visiting logic in StreamAction, handle file unzipping via Project.zipTree. (#1233)
  • Migrate doc sites to MkDocs. (#1302)
  • runShadow no longer depends on installShadowDist. (#1353)
  • Move the group of ShadowJar from shadow to build. (#1355)
  • In-development snapshots are now published to the Central Portal Snapshots repository. (#1414)

Fixed

  • Fix single Log4j2Plugins.dat isn't included into fat jar. (#1039)
  • Fail builds if processing bad jars. (#1146)
  • Fix Log4j2PluginsCacheFileTransformer not working for merging Log4j2Plugins.dat files. (#1175)
  • Support overriding mainClass provided by JavaApplication. (#1182)
  • Fix ShadowJar not being successful after includes or excludes are changed. (#1200)
  • Honor DuplicatesStrategy. (#1233)
  • Honor unzipped jars via from. (#1233)
  • Fix the last modified time of shadowed directories. (#1277)
  • Fix relocation exclusion for file patterns like kotlin/kotlin.kotlin_builtins. (#1313)
  • Allow using file trees of JARs together with the configuration cache. (#1441)

Removed

  • BREAKING CHANGE: Remove Develocity integration. (#1014)
  • BREAKING CHANGE: Some public getters and setters have been removed in SimpleRelocator. (#1079)
  • BREAKING CHANGE: Remove JavaJarExec, now use JavaExec directly for runShadow task. (#1197)
  • BREAKING CHANGE: ServiceFileTransformer.ServiceStream has been removed. (#1218)
  • BREAKING CHANGE: Remove KnowsTask as it's useless. (#1236)
  • BREAKING CHANGE: Remove BaseStreamAction. (#1258)
  • BREAKING CHANGE: Remove ShadowStats. (#1264)
  • BREAKING CHANGE: Remove ShadowCopyAction.ArchiveFileTreeElement and RelativeArchivePath. (#1233)
  • BREAKING CHANGE: Remove TransformerContext.getEntryTimestamp. (#1245)
  • BREAKING CHANGE: Reduce dependency and project overloads in DependencyFilter. (#1328)

New Contributors

Read more

8.3.8

01 Jul 13:15
6861d79
Compare
Choose a tag to compare

Warning

Only Gradle 9 support is being backported to this version. No additional features or crucial bug fixes will be included in the 8.x line. Please migrate to Shadow 9 as soon as possible.

Fixed

  • Fix the regression of PropertiesFileTransformer in 8.3.7. (#1493)

Changed

  • Expose Ant as compile scope. (#1488)

8.3.7

24 Jun 01:28
badabad
Compare
Choose a tag to compare

Warning

Only Gradle 9 support is being backported to this version. No additional features or crucial bug fixes will be included in the 8.x line. Please migrate to Shadow 9 as soon as possible.

Fixed

  • Fix compatibility for Gradle 9.0.0 RC1. (#1470)

9.0.0-beta17

18 Jun 09:36
3ab2d14
Compare
Choose a tag to compare

Fixed

  • Fix compatibility for Gradle 9.0.0 RC1. (#1468)

9.0.0-beta16

14 Jun 01:47
0448b55
Compare
Choose a tag to compare

Changed

  • Update ASM to 9.8 to support Java 25. (#1380)

Fixed

  • Restore removed Named from ResourceTransformer. (#1449)

9.0.0-beta15

28 May 09:55
4f3ce56
Compare
Choose a tag to compare

Fixed

  • Pin the plugin's Kotlin language level on 2.0. (#1448)
    The language level used in 9.0.0-beta14 is 2.2, which may cause compatibility issues for the plugins depending on
    Shadow.

9.0.0-beta14

28 May 05:45
75799d6
Compare
Choose a tag to compare

Changed

  • Update start script templates. (#1419)

Fixed

  • Allow using file trees of JARs together with the configuration cache. (#1441)
  • Fallback RelocateClassContext and RelocatePathContext to data classes. (#1445)