Last active
August 29, 2015 13:56
-
-
Save darylteo/8891557 to your computer and use it in GitHub Desktop.
Working with a task created by maven-publish pulication.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apply plugin: 'java' | |
| apply plugin: 'maven-publish' | |
| task sourceJar(type: Jar) { | |
| from sourceSets.main.allJava | |
| } | |
| task dummy << { | |
| } | |
| publishing { | |
| publications { | |
| mavenJava(MavenPublication) { | |
| from components.java | |
| artifact sourceJar { | |
| classifier "sources" | |
| } | |
| } | |
| } | |
| } | |
| afterEvaluate { | |
| publishMavenJavaPublicationToMavenLocal { | |
| dependsOn(dummy) | |
| doFirst { | |
| println "Does this work?" | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment