renovate-bot opened a new pull request, #2289: URL: https://github.com/apache/polaris/pull/2289
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [com.gradleup.shadow:shadow-gradle-plugin](https://redirect.github.com/GradleUp/shadow) | `8.3.9` -> `9.0.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>GradleUp/shadow (com.gradleup.shadow:shadow-gradle-plugin)</summary> ### [`v9.0.0`](https://redirect.github.com/GradleUp/shadow/releases/tag/9.0.0) [Compare Source](https://redirect.github.com/GradleUp/shadow/compare/8.3.9...9.0.0) > \[!WARNING] > This release is a major update from the 8.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](https://gradleup.com/shadow/) before upgrading. > > *If you really don't want to upgrade, you can still use the 8.3.x, which is also Gradle 9 compatible. But no additional features or crucial bug fixes will be included in the 8.x line.* > \[!TIP] > You can diff the shadowed JARs when upgrading from 8.x to 9.x by using [Diffuse](https://redirect.github.com/JakeWharton/diffuse).\ > If there are any things missing in the changelog or the doc site, please report them to us. ##### Added - Add .md support to the Apache License and Notice transformers. ([#​1041](https://redirect.github.com/GradleUp/shadow/pull/1041)) - Sync `SimpleRelocator` changes from maven-shade-plugin. ([#​1076](https://redirect.github.com/GradleUp/shadow/pull/1076)) - Support configuring `separator` in `AppendingTransformer`. ([#​1169](https://redirect.github.com/GradleUp/shadow/pull/1169))\ This is useful for handling files like `resources/application.yml`. - Exclude `module-info.class` in Multi-Release folders by default. ([#​1177](https://redirect.github.com/GradleUp/shadow/pull/1177)) - Inject `TargetJvmVersion` attribute for Gradle Module Metadata. ([#​1199](https://redirect.github.com/GradleUp/shadow/pull/1199)) - Sync `ShadowApplicationPlugin` with `ApplicationPlugin`. ([#​1224](https://redirect.github.com/GradleUp/shadow/pull/1224)) - Inject `Multi-Release` manifest attribute if any dependency contains it. ([#​1239](https://redirect.github.com/GradleUp/shadow/pull/1239)) - Mark `Transformer` as throwing `IOException`. ([#​1248](https://redirect.github.com/GradleUp/shadow/pull/1248)) - Reduce duplicate `SimpleRelocator` to improve performance. ([#​1271](https://redirect.github.com/GradleUp/shadow/pull/1271)) - Compat Kotlin Multiplatform plugin. ([#​1280](https://redirect.github.com/GradleUp/shadow/pull/1280)) - Add Kotlin DSL examples in docs. ([#​1306](https://redirect.github.com/GradleUp/shadow/pull/1306)) - Support using type-safe dependency accessors in `ShadowJar.dependencies`. ([#​1322](https://redirect.github.com/GradleUp/shadow/pull/1322)) - Support command line options for `ShadowJar`. ([#​1365](https://redirect.github.com/GradleUp/shadow/pull/1365)) ``` --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. ``` - Support skipping string constant remapping. ([#​1401](https://redirect.github.com/GradleUp/shadow/pull/1401)) - Let `assemble` depend on `shadowJar`. ([#​1524](https://redirect.github.com/GradleUp/shadow/pull/1524)) - Fail build when inputting AAR files or using Shadow with AGP. ([#​1530](https://redirect.github.com/GradleUp/shadow/pull/1530)) - Add `PreserveFirstFoundResourceTransformer`. ([#​1548](https://redirect.github.com/GradleUp/shadow/pull/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](https://redirect.github.com/GradleUp/shadow/pull/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 stricter fallback check before the JAR is created. ##### Changed - **BREAKING CHANGE:** Rewrite this plugin in Kotlin. ([#​1012](https://redirect.github.com/GradleUp/shadow/pull/1012)) - **BREAKING CHANGE:** Migrate `Transformer`s to using lazy properties. ([#​1036](https://redirect.github.com/GradleUp/shadow/pull/1036)) - **BREAKING CHANGE:** Migrate `ShadowJar` to using lazy properties. ([#​1044](https://redirect.github.com/GradleUp/shadow/pull/1044)) - **BREAKING CHANGE:** Resolve `Configuration` directly in `DependencyFilter`. ([#​1045](https://redirect.github.com/GradleUp/shadow/pull/1045)) - **BREAKING CHANGE:** Migrate `SimpleRelocator` to using lazy properties. ([#​1047](https://redirect.github.com/GradleUp/shadow/pull/1047)) - **BREAKING CHANGE:** Some public getters have been updated in `SimpleRelocator`. ([#​1079](https://redirect.github.com/GradleUp/shadow/pull/1079)) - **BREAKING CHANGE:** Migrate all `ListProperty` usages to `SetProperty`. ([#​1103](https://redirect.github.com/GradleUp/shadow/pull/1103))\ Some public `List` parameters are also changed to `Set`. - **BREAKING CHANGE:** Mark `RelocatorRemapper` as `internal`. ([#​1227](https://redirect.github.com/GradleUp/shadow/pull/1227)) - **BREAKING CHANGE:** Bump min Java requirement to 11. ([#​1242](https://redirect.github.com/GradleUp/shadow/pull/1242)) - **BREAKING CHANGE:** Move tracking unused classes logic out of `ShadowCopyAction`. ([#​1257](https://redirect.github.com/GradleUp/shadow/pull/1257)) - **BREAKING CHANGE:** Move `DependencyFilter` into `tasks` package. ([#​1272](https://redirect.github.com/GradleUp/shadow/pull/1272)) - **BREAKING CHANGE:** Change the default `duplicatesStrategy` from `EXCLUDE` to `INCLUDE`. ([#​1233](https://redirect.github.com/GradleUp/shadow/pull/1233)) - `ShadowJar` recognized `EXCLUDE` as the default, but the other strategies didn't work properly. - Now `ShadowJar` honors `INCLUDE` as the default, and aligns all the strategy behaviors with the Gradle side. - `mergeServiceFiles` and `ServiceFileTransformer` do not work with `EXCLUDE`, as it will exclude extra service files to be merged. - Duplicate entries might be bundled due to this change, but you can reduce them by using the newly added `PreserveFirstFoundResourceTransformer`. - Use `filesMatching` to override the default strategy for specific files. - Set `failOnDuplicateEntries = true` to fail the build to check for duplicate entries. - See more details at [Handling Duplicates Strategy](https://gradleup.com/shadow/configuration/merging/#handling-duplicates-strategy). - **BREAKING CHANGE:** Align the behavior of `ShadowTask.from` with Gradle's `AbstractCopyTask.from`. ([#​1233](https://redirect.github.com/GradleUp/shadow/pull/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: ```kotlin tasks.shadowJar { // Unzip the files before pass them to `from` by using `zipTree`. from(zipTree(files('path/to/your/file.zip'))) } ``` or ```kotlin dependencies { // Add the files to `implementation` configuration, Shadow will unzip them automatically. implementation(files('path/to/your/file.zip')) } ``` - **BREAKING CHANGE:** Rename `Transformer` to `ResourceTransformer`. ([#​1288](https://redirect.github.com/GradleUp/shadow/pull/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](https://redirect.github.com/GradleUp/shadow/pull/1303)) - **BREAKING CHANGE:** Polish `ShadowSpec`. ([#​1307](https://redirect.github.com/GradleUp/shadow/pull/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](https://redirect.github.com/GradleUp/shadow/pull/1308)) - **BREAKING CHANGE:** Rename `ShadowJar`'s `isEnableRelocation` to `enableAutoRelocation`. ([#​1541](https://redirect.github.com/GradleUp/shadow/pull/1541)) - **BREAKING CHANGE:** Some const values in `ShadowBasePlugin` and `ShadowJavaPlugin` are moved. ([#​1589](https://redirect.github.com/GradleUp/shadow/pull/1589))\ You can find them in `ShadowJar`, `ShadowApplicationPlugin`, and `ShadowJavaPlugin`. - Replace deprecated `SelfResolvingDependency` with `FileCollectionDependency`. ([#​1114](https://redirect.github.com/GradleUp/shadow/pull/1114)) - Update start script templates. ([#​1183](https://redirect.github.com/GradleUp/shadow/pull/1183)) - Mark more `Transformer`s cacheable. ([#​1210](https://redirect.github.com/GradleUp/shadow/pull/1210)) - Mark `ShadowJar.dependencyFilter` as `@Input`. ([#​1206](https://redirect.github.com/GradleUp/shadow/pull/1206)) - Polish `startShadowScripts` task registering. ([#​1216](https://redirect.github.com/GradleUp/shadow/pull/1216)) - Refactor file visiting logic in `StreamAction`, handle file unzipping via `Project.zipTree`. ([#​1233](https://redirect.github.com/GradleUp/shadow/pull/1233)) - Migrate doc sites to MkDocs. ([#​1302](https://redirect.github.com/GradleUp/shadow/pull/1302)) - `runShadow` no longer depends on `installShadowDist`. ([#​1353](https://redirect.github.com/GradleUp/shadow/pull/1353)) - Move the group of `ShadowJar` from `shadow` to `build`. ([#​1355](https://redirect.github.com/GradleUp/shadow/pull/1355)) - In-development snapshots are now published to the Central Portal Snapshots repository. ([#​1414](https://redirect.github.com/GradleUp/shadow/pull/1414)) - Expose `AbstractDependencyFilter` from `internal` to `public`. ([#​1538](https://redirect.github.com/GradleUp/shadow/pull/1538))\ You can access it via `com.github.jengelman.gradle.plugins.shadow.tasks.DependencyFilter.AbstractDependencyFilter`. - Mark `Action` parameters as non-null. ([#​1555](https://redirect.github.com/GradleUp/shadow/pull/1555)) - Use `BufferedOutputStream` when writing the Zip file to improve performance. ([#​1580](https://redirect.github.com/GradleUp/shadow/pull/1580)) ##### Fixed - Fix single Log4j2Plugins.dat isn't included into fat jar. ([#​1039](https://redirect.github.com/GradleUp/shadow/issues/1039)) - Fail builds if processing bad jars. ([#​1146](https://redirect.github.com/GradleUp/shadow/pull/1146)) - Fix `Log4j2PluginsCacheFileTransformer` not working for merging `Log4j2Plugins.dat` files. ([#​1175](https://redirect.github.com/GradleUp/shadow/pull/1175)) - Support overriding `mainClass` provided by `JavaApplication`. ([#​1182](https://redirect.github.com/GradleUp/shadow/pull/1182)) - Fix `ShadowJar` not being successful after `includes` or `excludes` are changed. ([#​1200](https://redirect.github.com/GradleUp/shadow/pull/1200)) - Honor `DuplicatesStrategy`. ([#​1233](https://redirect.github.com/GradleUp/shadow/pull/1233)) - Honor unzipped jars via `from`. ([#​1233](https://redirect.github.com/GradleUp/shadow/pull/1233)) - Fix the last modified time of shadowed directories. ([#​1277](https://redirect.github.com/GradleUp/shadow/pull/1277)) - Fix relocation exclusion for file patterns like `kotlin/kotlin.kotlin_builtins`. ([#​1313](https://redirect.github.com/GradleUp/shadow/pull/1313)) - Allow using file trees of JARs together with the configuration cache. ([#​1441](https://redirect.github.com/GradleUp/shadow/pull/1441)) ##### Removed - **BREAKING CHANGE:** Some public getters and setters have been removed in `SimpleRelocator`. ([#​1079](https://redirect.github.com/GradleUp/shadow/pull/1079)) - **BREAKING CHANGE:** Remove `JavaJarExec`, now use `JavaExec` directly for `runShadow` task. ([#​1197](https://redirect.github.com/GradleUp/shadow/pull/1197)) - **BREAKING CHANGE:** `ServiceFileTransformer.ServiceStream` has been removed. ([#​1218](https://redirect.github.com/GradleUp/shadow/pull/1218)) - **BREAKING CHANGE:** Remove `KnowsTask` as it's useless. ([#​1236](https://redirect.github.com/GradleUp/shadow/pull/1236)) - **BREAKING CHANGE:** Remove `BaseStreamAction`. ([#​1258](https://redirect.github.com/GradleUp/shadow/pull/1258)) - **BREAKING CHANGE:** Remove `ShadowStats`. ([#​1264](https://redirect.github.com/GradleUp/shadow/pull/1264)) - **BREAKING CHANGE:** Remove `ShadowCopyAction.ArchiveFileTreeElement` and `RelativeArchivePath`. ([#​1233](https://redirect.github.com/GradleUp/shadow/pull/1233)) - **BREAKING CHANGE:** Remove `TransformerContext.getEntryTimestamp`. ([#​1245](https://redirect.github.com/GradleUp/shadow/pull/1245)) - **BREAKING CHANGE:** Reduce dependency and project overloads in `DependencyFilter`. ([#​1328](https://redirect.github.com/GradleUp/shadow/pull/1328)) - **BREAKING CHANGE:** Remove `ShadowSpec`. ([#​1560](https://redirect.github.com/GradleUp/shadow/pull/1560)) - **BREAKING CHANGE:** Remove `Relocator.ROLE`. ([#​1563](https://redirect.github.com/GradleUp/shadow/pull/1563)) - **BREAKING CHANGE:** Remove deprecated `ShadowExtension.component`. ([#​1586](https://redirect.github.com/GradleUp/shadow/pull/1586)) ##### Migration Example **8.x** ```kt tasks.shadowJar { isEnableRelocation = true duplicatesStrategy = DuplicatesStrategy.EXCLUDE mergeServiceFiles() from("foo.jar") } ``` **9.x** ```kt tasks.shadowJar { // `isEnableRelocation` has been renamed to `enableAutoRelocation`. enableAutoRelocation = true // The default `duplicatesStrategy` has been changed from `EXCLUDE` to `INCLUDE`. duplicatesStrategy = DuplicatesStrategy.INCLUDE // If you want to make `mergeServiceFiles` work, should leave the `duplicatesStrategy` as `INCLUDE`. // `EXCLUDE` will exclude extra service files to be merged. mergeServiceFiles() // If you leave `duplicatesStrategy` as `INCLUDE`, you can use the new `PreserveFirstFoundResourceTransformer` // to ensure that only the first found resource is included in the final JAR. Or duplicate entries will be bundled. transform<PreserveFirstFoundResourceTransformer>() { resources.add("META-INF/some-resource.txt") } // Optionally, you can enable the new `failOnDuplicateEntries` property to fail the build if there are duplicate entries. failOnDuplicateEntries = true // If you want to keep the `foo.jar` as-is (zipped), you can use the `from` method directly. This is different from the previous. from("foo.jar") // If you want to unzip the `foo.jar` before processing, you can use `zipTree` to unzip it. from(zipTree("foo.jar")) } ``` ##### New Contributors - [@​KurdTt](https://redirect.github.com/KurdTt) made their first contribution in [https://github.com/GradleUp/shadow/pull/1039](https://redirect.github.com/GradleUp/shadow/pull/1039) - [@​dependabot](https://redirect.github.com/dependabot)\[bot] made their first contribution in[https://github.com/GradleUp/shadow/pull/1192](https://redirect.github.com/GradleUp/shadow/pull/1192)2 - [@​SimonMarquis](https://redirect.github.com/SimonMarquis) made their first contribution in [https://github.com/GradleUp/shadow/pull/1194](https://redirect.github.com/GradleUp/shadow/pull/1194) - [@​andsel](https://redirect.github.com/andsel) made their first contribution in [https://github.com/GradleUp/shadow/pull/1241](https://redirect.github.com/GradleUp/shadow/pull/1241) - [@​github-actions](https://redirect.github.com/github-actions)\[bot] made their first contribution in[https://github.com/GradleUp/shadow/pull/1419](https://redirect.github.com/GradleUp/shadow/pull/1419)9 - [@​vlsi](https://redirect.github.com/vlsi) made their first contribution in [https://github.com/GradleUp/shadow/pull/1490](https://redirect.github.com/GradleUp/shadow/pull/1490) - [@​Jonathing](https://redirect.github.com/Jonathing) made their first contribution in [https://github.com/GradleUp/shadow/pull/1422](https://redirect.github.com/GradleUp/shadow/pull/1422) - [@​Copilot](https://redirect.github.com/Copilot) made their first contribution in [https://github.com/GradleUp/shadow/pull/1500](https://redirect.github.com/GradleUp/shadow/pull/1500) - [@​DreierF](https://redirect.github.com/DreierF) made their first contribution in [https://github.com/GradleUp/shadow/pull/1502](https://redirect.github.com/GradleUp/shadow/pull/1502) - [@​gabrielfeo](https://redirect.github.com/gabrielfeo) made their first contribution in [https://github.com/GradleUp/shadow/pull/1505](https://redirect.github.com/GradleUp/shadow/pull/1505) **Full Changelog**: https://github.com/GradleUp/shadow/compare/8.3.9...9.0.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. â™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/apache/polaris). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS41MS4xIiwidXBkYXRlZEluVmVyIjoiNDEuNTEuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsicmVub3ZhdGUtcG9sYXJpcyJdfQ==--> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org