Merge License Resource Transformer
Generates a license file using the configured license text source.
An optional SPDX-License-Identifier can be placed in front of the license text to avoid ambiguous license detection by license-detection-tools.
License texts found in the file names:
META-INF/LICENSEMETA-INF/LICENSE.txtMETA-INF/LICENSE.mdLICENSELICENSE.txtLICENSE.md
are included for the shadowed jar sources.
To exclude these defaults, add excludes to the transformer configuration.
Use the org.gradle.api.tasks.util.PatternFilterable functions to specify a different set of files to include, the paths mentioned above are then not considered unless explicitly included.
Constructors
Properties
Path to the project's license text, this property must be configured.
The generated license file is potentially a collection of multiple license texts. To avoid ambiguous license detection by license-detection-tools, an SPDX license identifier header (SPDX-License-Identifier:) is added at the beginning of the generated file if the value of this property is present and not empty. Defaults to Apache-2.0.
Separator between the project's license text and license texts from the included dependencies.
This is used for creating Gradle's lazy properties in the subclass, Shadow's build-in transformers that depend on this have been injected via ObjectFactory.newInstance. Custom transformers should implement or inject this property if they need to access it.
Path to write the aggregated license file to. Defaults to META-INF/LICENSE.