Skip to content

Commit

Permalink
[misc] Remove deprecated method and add notes about breaking change.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnrengelman committed Aug 26, 2014
1 parent a8b48e0 commit 36295e9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 22 deletions.
3 changes: 2 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
v1.1.0
======

+ (Breaking Change!) Fix leaking of `shadowJar.manifest` into `jar.manifest`. ([Issue #82](https://github.com/johnrengelman/shadow/issues/82))
To simplify behavior, the `shadowJar.appendManifest` method has been removed. Replace uses with `shadowJar.manifest`
+ `ShadowTask` now has a `configurations` property that is resolved to the files in the resolved configuration before
being added to the copy spec. This allows for an easier implementation for filtering. The default 'shadowJar' task
has the convention of adding the `'runtime'` scope to this list. Manually created instances of `ShadowTask` have no
Expand All @@ -14,7 +16,6 @@ v1.1.0
+ [Matt Hurne](https://github.com/mhurne) - Added `GroovyExtensionModuleTransformer` for merging Groovy Extension module
descriptor files. The existing `ServiceFileTransformer` now excludes Groovy Extension Module descriptors by default.
+ `distShadowZip` and `distShadowZip` now contain the shadow library and run scripts instead of the default from the `'application'` plugin ([Issue #89](https://github.com/johnrengelman/shadow/issues/89))
+ Fix leaking of `shadowJar.manifest` into `jar.manifest`. ([Issue #82](https://github.com/johnrengelman/shadow/issues/82))

v1.0.3
======
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,6 @@ class ShadowJar extends Jar implements ShadowSpec {
}
}

/**
* Append content to the JAR Manifest created by the Jar task.
* @param configureClosure
* @return
*
* @deprecated Use manifest {} instead
*/
@Deprecated
ShadowJar appendManifest(Closure configureClosure) {
logger.warn 'The appendManifest method is deprecated and will be removed in the next major version. Use manifest(Closure) instead.'
ConfigureUtil.configure(configureClosure, getManifest())
return this
}

/**
* Add a class relocator that maps each class in the pattern to the provided destination
* @param pattern
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ interface ShadowSpec extends CopySpec {

ShadowSpec append(String resourcePath)

@Deprecated
ShadowSpec appendManifest(Closure configure)

ShadowSpec relocate(String pattern, String destination)

ShadowSpec relocate(String pattern, String destination, Closure configure)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class RelocationSpec extends PluginSpecification {
| classifier = null
| relocate 'junit.textui', 'a'
| relocate 'junit.framework', 'b'
| appendManifest {
| manifest {
| attributes 'TEST-VALUE': 'FOO'
| }
|}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ class TransformerSpec extends PluginSpecification {
|shadowJar {
| baseName = 'shadow'
| classifier = null
| appendManifest {
| manifest {
| attributes 'Test-Entry': 'PASSED'
| attributes 'New-Entry': 'NEW'
| }
Expand Down Expand Up @@ -509,7 +509,7 @@ class TransformerSpec extends PluginSpecification {
}

@Issue('SHADOW-82')
def 'shadow.appendManifest leaks to jar.manifest'() {
def 'shadow manifest leaks to jar manifest'() {
given:
File main = file('src/main/java/shadow/Main.java')
main << '''
Expand All @@ -536,7 +536,7 @@ class TransformerSpec extends PluginSpecification {
|shadowJar {
| baseName = 'shadow'
| classifier = null
| appendManifest {
| manifest {
| attributes 'Test-Entry': 'PASSED'
| attributes 'New-Entry': 'NEW'
| }
Expand Down

0 comments on commit 36295e9

Please sign in to comment.