# gradleup/shadow

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/gradleup-shadow).**

4,204 stars · 423 forks · Kotlin · Apache-2.0

## Links

- GitHub: https://github.com/GradleUp/shadow
- Homepage: https://gradleup.com/shadow/
- awesome-repositories: https://awesome-repositories.com/repository/gradleup-shadow.md

## Topics

`build` `bundling` `fat-jar` `fatjar` `gradle` `gradle-plugin` `groovy` `hacktoberfest` `jar` `java` `kotlin` `one-jar` `onejar` `scala` `shading` `uber-jar` `uberjar`

## Description

Shadow is a Gradle plugin used to create fat JARs by bundling a JVM application and all its runtime dependencies into a single executable archive. It functions as a dependency bundler and archive generator, simplifying distribution by merging multiple library files into one artifact.

The project is distinguished by its ability to perform bytecode package relocation, which renames package paths and import statements to prevent classpath version conflicts. It also provides resource merging tools that combine files with identical paths using custom text or XML transformers and produces reproducible builds by normalizing file timestamps and permissions.

The plugin covers broad capabilities including archive content filtering, manifest management, and the generation of startup scripts for deployment. It also handles artifact publishing through metadata-driven workflows and provides diagnostic utilities for duplicate entry detection and classpath resource location.

## Tags

### Development Tools & Productivity

- [Fat JAR Plugins](https://awesome-repositories.com/f/development-tools-productivity/fat-jar-plugins.md) — Bundles an application and all its runtime dependencies into a single executable fat JAR. ([source](https://gradleup.com/shadow/))
- [Shadowed Artifact Publishing](https://awesome-repositories.com/f/development-tools-productivity/dependency-managers/artifact-distribution-systems/package-publishing/artifact-publishing-utilities/maven-artifact-publishing/shadowed-artifact-publishing.md) — Uploads fat archives to repositories and generates metadata files with correct dependency scopes. ([source](https://gradleup.com/shadow/publishing/))
- [Project Bundling](https://awesome-repositories.com/f/development-tools-productivity/project-bundling.md) — Merges project configurations and dependencies into a single self-contained executable file. ([source](https://gradleup.com/shadow/configuration/dependencies/))
- [Artifact Metadata Publishing](https://awesome-repositories.com/f/development-tools-productivity/build-plugin-architectures/gradle-convention-plugins/artifact-metadata-publishing.md) — Publishes target versions and bundling attributes as metadata so downstream consumers resolve dependencies correctly. ([source](https://gradleup.com/shadow/changes/))
- [Dependency Scope Configurations](https://awesome-repositories.com/f/development-tools-productivity/dependency-managers/artifact-distribution-systems/package-publishing/artifact-publishing-utilities/maven-artifact-publishing/shadowed-artifact-publishing/dependency-scope-configurations.md) — Specifies which runtime dependencies are bundled into the final archive and which remain as external declarations. ([source](https://gradleup.com/shadow/publishing/))
- [Startup Script Generation](https://awesome-repositories.com/f/development-tools-productivity/os-specific-settings/startup-script-generation.md) — Creates executable scripts to launch the application with custom output directories and environment variables. ([source](https://gradleup.com/shadow/changes/))
- [Dependency Exclusions](https://awesome-repositories.com/f/development-tools-productivity/project-dependency-specifications/dependency-exclusions.md) — Explicitly excludes specific direct dependencies from the final merged archive to reduce file size. ([source](https://gradleup.com/shadow/configuration/dependencies/))
- [Shadowed Artifact Exposure](https://awesome-repositories.com/f/development-tools-productivity/shadowed-artifact-exposure.md) — Configures project elements to serve the combined archive instead of the standard one to dependent projects. ([source](https://gradleup.com/shadow/multi-project/))

### Data & Databases

- [Package Relocation](https://awesome-repositories.com/f/data-databases/namespaces/namespace-aliasing/package-relocation.md) — Provides bytecode-level package relocation to avoid classpath conflicts between different library versions.
- [Resource File Merging](https://awesome-repositories.com/f/data-databases/text-file-merging/resource-file-merging.md) — Combines resource files with identical paths from different dependencies using custom transformers. ([source](https://gradleup.com/shadow/configuration/merging/))

### DevOps & Infrastructure

- [JVM Application Bundling](https://awesome-repositories.com/f/devops-infrastructure/jvm-application-bundling.md) — Packages combined archives with startup scripts and configuration files into compressed folders ready for production environments.
- [Deployment Archive Bundling](https://awesome-repositories.com/f/devops-infrastructure/standalone-archive-deployment/deployment-archive-bundling.md) — Bundles combined archives with startup scripts and supporting files into compressed folders for distribution. ([source](https://gradleup.com/shadow/application-plugin/))

### Programming Languages & Runtimes

- [Fat JAR Flattening](https://awesome-repositories.com/f/programming-languages-runtimes/fat-jar-flattening.md) — Extracts all runtime dependencies into a single flat executable archive for simplified distribution.
- [JVM Dependency Bundlers](https://awesome-repositories.com/f/programming-languages-runtimes/jvm-dependency-bundlers.md) — Merges JVM application sources and runtime dependencies into a single executable archive. ([source](https://gradleup.com/shadow/kotlin-plugins/))
- [Library Artifact Bundling](https://awesome-repositories.com/f/programming-languages-runtimes/library-artifact-bundling.md) — Combines multiple library files into a single artifact to simplify the publishing process and reduce consumer dependencies.
- [Manifest Execution Configuration](https://awesome-repositories.com/f/programming-languages-runtimes/program-entry-points/executable-entry-points/manifest-execution-configuration.md) — Configures the application entry point and classpath via metadata within the archive manifest.

### Part of an Awesome List

- [Cross-Project Dependency Merging](https://awesome-repositories.com/f/awesome-lists/devtools/build-and-dependency-management/multi-project-orchestration/cross-project-dependency-merging.md) — Combines dependencies from multiple projects in a single build into one unified archive output. ([source](https://gradleup.com/shadow/multi-project/))

### Operating Systems & Systems Programming

- [Archive Content Filtering](https://awesome-repositories.com/f/operating-systems-systems-programming/file-archiving/archive-content-filtering.md) — Uses pattern-matching rules to selectively include or exclude files and dependencies from the final archive.

### Software Engineering & Architecture

- [Archive Manifest Customization](https://awesome-repositories.com/f/software-engineering-architecture/configuration-manifests/archive-manifest-customization.md) — Merges entries from multiple sources and inherits standard attributes to define executable properties in the manifest. ([source](https://gradleup.com/shadow/configuration/))
- [External Dependency Manifesting](https://awesome-repositories.com/f/software-engineering-architecture/dependency-manifests/external-dependency-manifesting.md) — Keeps runtime dependencies outside the archive while automatically listing them in the manifest path. ([source](https://gradleup.com/shadow/configuration/))
- [Duplicate Entry Resolution](https://awesome-repositories.com/f/software-engineering-architecture/duplicate-entry-resolution.md) — Provides strategies to handle file collisions during merging, such as keeping, ignoring, or failing the build. ([source](https://gradleup.com/shadow/configuration/merging/))
- [Reproducible Builds](https://awesome-repositories.com/f/software-engineering-architecture/reproducible-builds.md) — Ensures identical binary output across different environments by normalizing file timestamps and permissions.
- [Reproducible Archiving](https://awesome-repositories.com/f/software-engineering-architecture/reproducible-builds/reproducible-archiving.md) — Ensures byte-for-byte identical archives by normalizing file timestamps and permissions.
- [Resource Transformers](https://awesome-repositories.com/f/software-engineering-architecture/resource-merge-strategies/android-resource-merging/resource-transformers.md) — Implements custom text and XML transformers to merge resource files with identical paths from multiple dependencies.

### User Interface & Experience

- [Resource Deduplication](https://awesome-repositories.com/f/user-interface-experience/font-configurations/font-overrides/pdf-font-optimizers/duplicate-font-deduplication/resource-deduplication.md) — Combines files sharing the same path by appending content or removing duplicate entries to minimize size. ([source](https://gradleup.com/shadow/changes/))
