Skip to content

Conversation

@snazy
Copy link
Contributor

@snazy snazy commented Nov 17, 2025

Refs #1848.


  • CHANGELOG's "Unreleased" section has been updated, if applicable.

@snazy snazy force-pushed the merge-licenses-transformer branch from 37ff702 to 4b05489 Compare November 17, 2025 17:10
snazy added a commit to snazy/shadow that referenced this pull request Nov 17, 2025
Adds a new `DeduplicatingResourceTransformer` that works different than `PreserveFirstFoundResourceTransformer`.

`PreserveFirstFoundResourceTransformer` is to preserve the first resource that matches the configured paths and ignore all other ones.

`DeduplicatingResourceTransformer` preserves resources by path _and_ identical content and fails for all not explicitly allowed (excluded) resources with different content.
It works intentionally against all resources.
The new one is intended to guard a couple of unexpected situations:
* A (transitive) dependency brings a non-relocated version of a dependency that is also included elsewhere but with a different version. This could normally lead to unexpected exceptions during runtime.
* Unintended inclusion or removal or legally important license information, see also `MergeLicenseResourceTransformer` (GradleUp#1858).
* Unintended removal or (false) inclusion of shaded dependency information via `META-INF/x/y/pom.xml`/`.properties` files, which can be important for dependency/license analyzation tools.

Adding the functionality of `DeduplicatingResourceTransformer` to `PreserveFirstFoundResourceTransformer` became a bit too difficult without breaking the existing behavior of the latter.
snazy added a commit to snazy/shadow that referenced this pull request Nov 17, 2025
Adds a new `DeduplicatingResourceTransformer` that works different than `PreserveFirstFoundResourceTransformer`.

`PreserveFirstFoundResourceTransformer` is to preserve the first resource that matches the configured paths and ignore all other ones.

`DeduplicatingResourceTransformer` preserves resources by path _and_ identical content and fails for all not explicitly allowed (excluded) resources with different content.
It works intentionally against all resources.
The new one is intended to guard a couple of unexpected situations:
* A (transitive) dependency brings a non-relocated version of a dependency that is also included elsewhere but with a different version. This could normally lead to unexpected exceptions during runtime.
* Unintended inclusion or removal or legally important license information, see also `MergeLicenseResourceTransformer` (GradleUp#1858).
* Unintended removal or (false) inclusion of shaded dependency information via `META-INF/x/y/pom.xml`/`.properties` files, which can be important for dependency/license analyzation tools.

Adding the functionality of `DeduplicatingResourceTransformer` to `PreserveFirstFoundResourceTransformer` became a bit too difficult without breaking the existing behavior of the latter.
@snazy snazy force-pushed the merge-licenses-transformer branch from 4b05489 to 2a1b98f Compare November 18, 2025 07:29
snazy added a commit to snazy/shadow that referenced this pull request Nov 18, 2025
Adds a new `DeduplicatingResourceTransformer` that works different than `PreserveFirstFoundResourceTransformer`.

`PreserveFirstFoundResourceTransformer` is to preserve the first resource that matches the configured paths and ignore all other ones.

`DeduplicatingResourceTransformer` preserves resources by path _and_ identical content and fails for all not explicitly allowed (excluded) resources with different content.
It works intentionally against all resources.
The new one is intended to guard a couple of unexpected situations:
* A (transitive) dependency brings a non-relocated version of a dependency that is also included elsewhere but with a different version. This could normally lead to unexpected exceptions during runtime.
* Unintended inclusion or removal or legally important license information, see also `MergeLicenseResourceTransformer` (GradleUp#1858).
* Unintended removal or (false) inclusion of shaded dependency information via `META-INF/x/y/pom.xml`/`.properties` files, which can be important for dependency/license analyzation tools.

Adding the functionality of `DeduplicatingResourceTransformer` to `PreserveFirstFoundResourceTransformer` became a bit too difficult without breaking the existing behavior of the latter.
snazy added a commit to snazy/shadow that referenced this pull request Nov 18, 2025
Adds a new `DeduplicatingResourceTransformer` that works different than `PreserveFirstFoundResourceTransformer`.

`PreserveFirstFoundResourceTransformer` is to preserve the first resource that matches the configured paths and ignore all other ones.

`DeduplicatingResourceTransformer` preserves resources by path _and_ identical content and fails for all not explicitly allowed (excluded) resources with different content.
It works intentionally against all resources.
The new one is intended to guard a couple of unexpected situations:
* A (transitive) dependency brings a non-relocated version of a dependency that is also included elsewhere but with a different version. This could normally lead to unexpected exceptions during runtime.
* Unintended inclusion or removal or legally important license information, see also `MergeLicenseResourceTransformer` (GradleUp#1858).
* Unintended removal or (false) inclusion of shaded dependency information via `META-INF/x/y/pom.xml`/`.properties` files, which can be important for dependency/license analyzation tools.

Adding the functionality of `DeduplicatingResourceTransformer` to `PreserveFirstFoundResourceTransformer` became a bit too difficult without breaking the existing behavior of the latter.
@snazy snazy force-pushed the merge-licenses-transformer branch 2 times, most recently from ce9d32c to 88316b4 Compare November 18, 2025 08:51
snazy added a commit to snazy/shadow that referenced this pull request Nov 18, 2025
Adds a new `DeduplicatingResourceTransformer` that works different than `PreserveFirstFoundResourceTransformer`.

`PreserveFirstFoundResourceTransformer` is to preserve the first resource that matches the configured paths and ignore all other ones.

`DeduplicatingResourceTransformer` preserves resources by path _and_ identical content and fails for all not explicitly allowed (excluded) resources with different content.
It works intentionally against all resources.
The new one is intended to guard a couple of unexpected situations:
* A (transitive) dependency brings a non-relocated version of a dependency that is also included elsewhere but with a different version. This could normally lead to unexpected exceptions during runtime.
* Unintended inclusion or removal or legally important license information, see also `MergeLicenseResourceTransformer` (GradleUp#1858).
* Unintended removal or (false) inclusion of shaded dependency information via `META-INF/x/y/pom.xml`/`.properties` files, which can be important for dependency/license analyzation tools.

Adding the functionality of `DeduplicatingResourceTransformer` to `PreserveFirstFoundResourceTransformer` became a bit too difficult without breaking the existing behavior of the latter.
@snazy snazy force-pushed the merge-licenses-transformer branch from 88316b4 to 19c2530 Compare November 18, 2025 12:41
snazy added a commit to snazy/shadow that referenced this pull request Nov 19, 2025
Adds a new `DeduplicatingResourceTransformer` that works different than `PreserveFirstFoundResourceTransformer`.

`PreserveFirstFoundResourceTransformer` is to preserve the first resource that matches the configured paths and ignore all other ones.

`DeduplicatingResourceTransformer` preserves resources by path _and_ identical content and fails for all not explicitly allowed (excluded) resources with different content.
It works intentionally against all resources.
The new one is intended to guard a couple of unexpected situations:
* A (transitive) dependency brings a non-relocated version of a dependency that is also included elsewhere but with a different version. This could normally lead to unexpected exceptions during runtime.
* Unintended inclusion or removal or legally important license information, see also `MergeLicenseResourceTransformer` (GradleUp#1858).
* Unintended removal or (false) inclusion of shaded dependency information via `META-INF/x/y/pom.xml`/`.properties` files, which can be important for dependency/license analyzation tools.

Adding the functionality of `DeduplicatingResourceTransformer` to `PreserveFirstFoundResourceTransformer` became a bit too difficult without breaking the existing behavior of the latter.
@snazy snazy force-pushed the merge-licenses-transformer branch 2 times, most recently from 41d9ece to f549d75 Compare November 19, 2025 07:56
@Goooler Goooler changed the title Add transformer to merge licenses into a single license file Add MergeLicenseResourceTransformer Nov 19, 2025
@Goooler Goooler changed the title Add MergeLicenseResourceTransformer Add MergeLicenseResourceTransformer to merge licenses Nov 19, 2025
snazy added a commit to snazy/shadow that referenced this pull request Nov 19, 2025
Adds a new `DeduplicatingResourceTransformer` that works different than `PreserveFirstFoundResourceTransformer`.

`PreserveFirstFoundResourceTransformer` is to preserve the first resource that matches the configured paths and ignore all other ones.

`DeduplicatingResourceTransformer` preserves resources by path _and_ identical content and fails for all not explicitly allowed (excluded) resources with different content.
It works intentionally against all resources.
The new one is intended to guard a couple of unexpected situations:
* A (transitive) dependency brings a non-relocated version of a dependency that is also included elsewhere but with a different version. This could normally lead to unexpected exceptions during runtime.
* Unintended inclusion or removal or legally important license information, see also `MergeLicenseResourceTransformer` (GradleUp#1858).
* Unintended removal or (false) inclusion of shaded dependency information via `META-INF/x/y/pom.xml`/`.properties` files, which can be important for dependency/license analyzation tools.

Adding the functionality of `DeduplicatingResourceTransformer` to `PreserveFirstFoundResourceTransformer` became a bit too difficult without breaking the existing behavior of the latter.

This comment was marked as outdated.

Goooler and others added 4 commits November 19, 2025 21:09
…nsformers/MergeLicenseResourceTransformer.kt

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…nsformers/MergeLicenseResourceTransformer.kt

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…nsformers/MergeLicenseResourceTransformer.kt

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…nsformers/MergeLicenseResourceTransformer.kt

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

This comment was marked as outdated.

Goooler and others added 2 commits November 19, 2025 21:22
…nsformers/MergeLicenseResourceTransformer.kt

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

This comment was marked as outdated.

@Goooler Goooler merged commit ffca329 into GradleUp:main Nov 19, 2025
13 checks passed
@snazy snazy deleted the merge-licenses-transformer branch November 19, 2025 14:31
snazy added a commit to snazy/shadow that referenced this pull request Nov 19, 2025
Adds a new `DeduplicatingResourceTransformer` that works different than `PreserveFirstFoundResourceTransformer`.

`PreserveFirstFoundResourceTransformer` is to preserve the first resource that matches the configured paths and ignore all other ones.

`DeduplicatingResourceTransformer` preserves resources by path _and_ identical content and fails for all not explicitly allowed (excluded) resources with different content.
It works intentionally against all resources.
The new one is intended to guard a couple of unexpected situations:
* A (transitive) dependency brings a non-relocated version of a dependency that is also included elsewhere but with a different version. This could normally lead to unexpected exceptions during runtime.
* Unintended inclusion or removal or legally important license information, see also `MergeLicenseResourceTransformer` (GradleUp#1858).
* Unintended removal or (false) inclusion of shaded dependency information via `META-INF/x/y/pom.xml`/`.properties` files, which can be important for dependency/license analyzation tools.

Adding the functionality of `DeduplicatingResourceTransformer` to `PreserveFirstFoundResourceTransformer` became a bit too difficult without breaking the existing behavior of the latter.
snazy added a commit to snazy/shadow that referenced this pull request Nov 20, 2025
Adds a new `DeduplicatingResourceTransformer` that works different than `PreserveFirstFoundResourceTransformer`.

`PreserveFirstFoundResourceTransformer` is to preserve the first resource that matches the configured paths and ignore all other ones.

`DeduplicatingResourceTransformer` preserves resources by path _and_ identical content and fails for all not explicitly allowed (excluded) resources with different content.
It works intentionally against all resources.
The new one is intended to guard a couple of unexpected situations:
* A (transitive) dependency brings a non-relocated version of a dependency that is also included elsewhere but with a different version. This could normally lead to unexpected exceptions during runtime.
* Unintended inclusion or removal or legally important license information, see also `MergeLicenseResourceTransformer` (GradleUp#1858).
* Unintended removal or (false) inclusion of shaded dependency information via `META-INF/x/y/pom.xml`/`.properties` files, which can be important for dependency/license analyzation tools.

Adding the functionality of `DeduplicatingResourceTransformer` to `PreserveFirstFoundResourceTransformer` became a bit too difficult without breaking the existing behavior of the latter.
snazy added a commit to snazy/shadow that referenced this pull request Nov 21, 2025
Adds a new `DeduplicatingResourceTransformer` that works different than `PreserveFirstFoundResourceTransformer`.

`PreserveFirstFoundResourceTransformer` is to preserve the first resource that matches the configured paths and ignore all other ones.

`DeduplicatingResourceTransformer` preserves resources by path _and_ identical content and fails for all not explicitly allowed (excluded) resources with different content.
It works intentionally against all resources.
The new one is intended to guard a couple of unexpected situations:
* A (transitive) dependency brings a non-relocated version of a dependency that is also included elsewhere but with a different version. This could normally lead to unexpected exceptions during runtime.
* Unintended inclusion or removal or legally important license information, see also `MergeLicenseResourceTransformer` (GradleUp#1858).
* Unintended removal or (false) inclusion of shaded dependency information via `META-INF/x/y/pom.xml`/`.properties` files, which can be important for dependency/license analyzation tools.

Adding the functionality of `DeduplicatingResourceTransformer` to `PreserveFirstFoundResourceTransformer` became a bit too difficult without breaking the existing behavior of the latter.
snazy added a commit to snazy/shadow that referenced this pull request Dec 3, 2025
Adds a new `DeduplicatingResourceTransformer` that works different than `PreserveFirstFoundResourceTransformer`.

`PreserveFirstFoundResourceTransformer` is to preserve the first resource that matches the configured paths and ignore all other ones.

`DeduplicatingResourceTransformer` preserves resources by path _and_ identical content and fails for all not explicitly allowed (excluded) resources with different content.
It works intentionally against all resources.
The new one is intended to guard a couple of unexpected situations:
* A (transitive) dependency brings a non-relocated version of a dependency that is also included elsewhere but with a different version. This could normally lead to unexpected exceptions during runtime.
* Unintended inclusion or removal or legally important license information, see also `MergeLicenseResourceTransformer` (GradleUp#1858).
* Unintended removal or (false) inclusion of shaded dependency information via `META-INF/x/y/pom.xml`/`.properties` files, which can be important for dependency/license analyzation tools.

Adding the functionality of `DeduplicatingResourceTransformer` to `PreserveFirstFoundResourceTransformer` became a bit too difficult without breaking the existing behavior of the latter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants