-
-
Notifications
You must be signed in to change notification settings - Fork 425
Port more non-API bug fixes and enhancements from main to 8.x #2189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a49a41b
c4acdd9
62dba81
9bd08df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,10 +44,11 @@ | |
| import java.lang.reflect.InvocationTargetException; | ||
| import java.util.ArrayList; | ||
| import java.util.List; | ||
| import java.util.Set; | ||
| import java.util.concurrent.Callable; | ||
|
|
||
| @CacheableTask | ||
| public abstract class ShadowJar extends Jar implements ShadowSpec { | ||
|
Check warning on line 51 in src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.java
|
||
|
|
||
| private List<Transformer> transformers; | ||
| private List<Relocator> relocators; | ||
|
|
@@ -71,7 +72,7 @@ | |
| } | ||
| }); | ||
|
|
||
| public ShadowJar() { | ||
|
Check warning on line 75 in src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.java
|
||
| super(); | ||
| setDuplicatesStrategy(DuplicatesStrategy.INCLUDE); //shadow filters out files later. This was the default behavior in Gradle < 6.x | ||
| dependencyFilter = new DefaultDependencyFilter(getProject()); | ||
|
|
@@ -81,6 +82,9 @@ | |
| relocators = new ArrayList<>(); | ||
| configurations = new ArrayList<>(); | ||
|
|
||
| this.getInputs().property("minimize", (Callable<Boolean>) () -> minimizeJar); | ||
| this.getInputs().property("includes", (Callable<Set<String>>) () -> getIncludes()); | ||
| this.getInputs().property("excludes", (Callable<Set<String>>) () -> getExcludes()); | ||
| this.getOutputs().doNotCacheIf("Has one or more transforms or relocators that are not cacheable", task -> { | ||
| for (Transformer transformer : transformers) { | ||
| if (!isCacheableTransform(transformer.getClass())) { | ||
|
|
@@ -171,7 +175,7 @@ | |
| } | ||
|
|
||
| @Internal | ||
| protected ZipCompressor getInternalCompressor() { | ||
|
Check warning on line 178 in src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.java
|
||
| return GradleVersionUtil.getInternalCompressor(getEntryCompression(), this); | ||
| } | ||
|
|
||
|
|
@@ -193,7 +197,7 @@ | |
| } | ||
|
|
||
| @Classpath | ||
| public FileCollection getIncludedDependencies() { | ||
|
Check warning on line 200 in src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.java
|
||
| return includedDependencies; | ||
| } | ||
|
|
||
|
|
@@ -431,7 +435,7 @@ | |
| } | ||
|
|
||
| @Nested | ||
| public List<Relocator> getRelocators() { | ||
|
Check warning on line 438 in src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.java
|
||
| return this.relocators; | ||
| } | ||
|
|
||
|
|
@@ -441,7 +445,7 @@ | |
|
|
||
| @Classpath | ||
| @Optional | ||
| public List<FileCollection> getConfigurations() { | ||
|
Check warning on line 448 in src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.java
|
||
| return this.configurations; | ||
| } | ||
|
|
||
|
|
@@ -450,7 +454,7 @@ | |
| } | ||
|
|
||
| @Internal | ||
| public DependencyFilter getDependencyFilter() { | ||
|
Check warning on line 457 in src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.java
|
||
| return this.dependencyFilter; | ||
| } | ||
|
|
||
|
|
@@ -468,7 +472,7 @@ | |
| } | ||
|
|
||
| @Input | ||
| public String getRelocationPrefix() { | ||
|
Check warning on line 475 in src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.java
|
||
| return relocationPrefix; | ||
| } | ||
|
|
||
|
|
@@ -482,7 +486,7 @@ | |
| */ | ||
| @Deprecated | ||
| @Input | ||
| public boolean getMinimizeJar() { | ||
|
Check warning on line 489 in src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.java
|
||
| return minimizeJar; | ||
| } | ||
|
|
||
|
|
@@ -491,7 +495,7 @@ | |
| * setting {@code false} is equivalent to not calling {@code minimize()}. | ||
| */ | ||
| @Deprecated | ||
| public void setMinimizeJar(boolean minimizeJar) { | ||
|
Check warning on line 498 in src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.java
|
||
| this.minimizeJar = minimizeJar; | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.