Skip to content

Commit

Permalink
Showing 6 changed files with 28 additions and 20 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ v0.9.0-M2

+ Added integration with `application` plugin to replace old `OutputSignedJars` task
+ Fixed bug that resulted in duplicate file entries in the resulting Jar
+ Changed plugin id to 'com.github.johnrengelman.shadow' to support Gradle 2.x plugin infrastructure.

v0.9.0-M1
=========
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ buildscript {
}
}
apply plugin: 'shadow'
apply plugin: 'com.github.johnrengelman.shadow'
```


@@ -188,7 +188,7 @@ TODO - need to implement this
### Publishing the shadow jar as an additional resource to the main jar

```
apply plugin: 'shadow'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'maven-publish'
publishing {
@@ -204,7 +204,7 @@ publishing {
### Publishing the shadow jar as a standalone artifact

```
apply plugin: 'shadow'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'maven-publish'
shadowJar {
16 changes: 0 additions & 16 deletions src/main/resources/META-INF/gradle-plugins/shadow.properties

This file was deleted.

Original file line number Diff line number Diff line change
@@ -148,7 +148,7 @@ public class Main {
}
"""
buildFile << """
apply plugin: 'shadow'
apply plugin: ${ShadowPlugin.name}
apply plugin: 'application'
mainClassName = 'myapp.Main'
Original file line number Diff line number Diff line change
@@ -43,6 +43,29 @@ class ShadowPluginSpec extends PluginSpecification {

}

def 'apply plugin by id'() {
given:
buildFile << """
apply plugin: 'com.github.johnrengelman.shadow'
repositories { jcenter() }
dependencies { compile 'junit:junit:3.8.2' }
shadowJar {
baseName = 'shadow'
classifier = null
}
"""

when:
runner.arguments << 'shadowJar'
ExecutionResult result = runner.run()

then:
success(result)
assert output.exists()
}

def 'shadow copy'() {
given:
URL artifact = this.class.classLoader.getResource('test-artifact-1.0-SNAPSHOT.jar')

0 comments on commit 8b6684f

Please sign in to comment.