github GradleUp/shadow 9.0.0-rc1

latest releases: 9.1.0, 9.0.2, 9.0.1...
2 months ago

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.

BREAKING

  • Rewrite this plugin in Kotlin. (#1012)
    Some APIs are marked as internal, and there are serial ABI changes.
  • Remove Develocity integration. (#1014)
  • Migrate Transformers to using lazy properties. (#1036)
  • Migrate ShadowJar to using lazy properties. isEnableRelocation is removed, use enableRelocation instead. (#1044)
  • Resolve Configuration directly in DependencyFilter. (#1045)
  • Some public getters are removed from SimpleRelocator, includes and excludes are exposed as SetPropertys. (#1079)
  • Migrate all ListProperty usages to SetProperty. Some public List parameters are also changed to Set. (#1103)
  • Remove JavaJarExec, now use JavaExec directly for runShadow task. (#1197)
  • ServiceFileTransformer.ServiceStream has been removed. (#1218)
  • Mark RelocatorRemapper as internal. (#1227)
  • Remove KnowsTask as it's useless. (#1236)
  • Remove TransformerContext.getEntryTimestamp. (#1245)
  • Move tracking unused classes logic out of ShadowCopyAction. (#1257)
  • Remove BaseStreamAction. (#1258)
  • Remove ShadowStats. (#1264)
  • Move DependencyFilter from com.github.jengelman.gradle.plugins.shadow.internal into com.github.jengelman.gradle.plugins.shadow.tasks. (#1272)
  • Rename Transformer to ResourceTransformer. Aims to better align with the name of org.apache.maven.plugins.shade.resource.ResourceTransformer.java and to distinguish itself from org.gradle.api.Transformer.java. (#1288)
  • Mark DefaultInheritManifest as internal. (#1303)
  • Polish ShadowSpec. 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. (#1307)
  • Remove redundant types from function returning. (#1308)
  • Reduce dependency and project overloads in DependencyFilter. (#1328)
  • Align the behavior of ShadowTask.from with Gradle's AbstractCopyTask.from. 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. (#1233)
  • Remove ShadowCopyAction.ArchiveFileTreeElement and RelativeArchivePath. (#1233)

Added

  • Add .md support to the Apache License and Notice transformers. (#1041)
  • Sync SimpleRelocator changes from maven-shade-plugin. (#1076)
  • Exclude module-info.class in Multi-Release folders by default. (#1177)
  • Inject TargetJvmVersion attribute for Gradle Module Metadata. (#1199)
  • Support Java 24. (#1222)
  • 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. You still need to manually configure manifest.attributes (e.g. Main-Class attr) in the shadowJar task if necessary. (#1280)
  • Add Kotlin DSL examples in docs. (#1306)
  • Support using type-safe dependency accessors in ShadowJar.dependencies. (#1322)
  • Set Main-Class attr for KMP 2.1.0 or above. (#1337)
  • Support command line options for ShadowJar. (#1365)

Changed

  • Exclude kotlin-stdlib from plugin dependencies. (#1093)
  • Replace deprecated SelfResolvingDependency with FileCollectionDependency. (#1114)
  • Support configuring separator in AppendingTransformer. This is useful for handling files like resources/application.yml. (#1169)
  • Update start script templates. (#1183) (#1419)
  • Mark ShadowJar.dependencyFilter as @Input. ShadowSpec.stats is removed and ShadowJar.stats is internal for now. (#1206)
  • Mark more Transformers cacheable. (#1210)
  • Polish startShadowScripts task registering. (#1216)
  • Bump min Java requirement to 11. (#1242)
  • Reduce duplicated SimpleRelocator to improve performance. (#1271)
  • Migrate doc sites to MkDocs. (#1302)
  • runShadow no longer depends on installShadowDist. (#1353)
  • Move the group of ShadowJar from shadow to build. (#1355)
  • Set Main-Class attr for KMP 1.9.0 or above. (#1410)
  • In-development snapshots are now published to the Central Portal Snapshots repository at https://central.sonatype.com/repository/maven-snapshots/. (#1414)
  • Update ASM to 9.8 to support Java 25. (#1380)
  • Refactor file visiting logic in StreamAction, handle file unzipping via Project.zipTree. (#1233)
  • Don't re-add suppressed Gradle API to compileOnly configuration. (#1422)
  • Bump the min Gradle requirement to 8.11. (#1479)
  • Expose Ant as compile scope. (#1488)

Fixed

  • Fix single Log4j2Plugins.dat isn't included into fat jar. (#1039)
  • Adjust property initializations and modifiers in ShadowJar. This fixes the regression for registering custom ShadowJar tasks. (#1090)
  • 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)
  • Fix the last modified time of shadowed directories. (#1277)
  • Fix relocation exclusion for file patterns like kotlin/kotlin.kotlin_builtins. (#1313)
  • Avoid creating jvm targets eagerly for KMP. (#1378)
  • Allow using file trees of JARs together with the configuration cache. (#1441)
  • Fallback RelocateClassContext and RelocatePathContext to data classes. (#1445)
  • Pin the plugin's Kotlin language level on 2.0. The language level used in 9.0.0-beta14 is 2.2, which may cause compatibility issues for the plugins depending on Shadow. (#1448)
  • Fix compatibility for Gradle 9.0.0 RC1. (#1468)
  • Honor DuplicatesStrategy. Shadow recognized DuplicatesStrategy.EXCLUDE as the default, but the other strategies didn't work properly. Now we honor DuplicatesStrategy.INCLUDE as the default, and align all the strategy behaviors with the Gradle side. (#1233)
  • Honor unzipped jars via from. (#1233)

New Contributors

Full Changelog: 8.3.8...9.0.0-rc1

Don't miss a new shadow release

NewReleases is sending notifications on new releases.