Created
October 9, 2013 21:54
-
-
Save johnrengelman/6909137 to your computer and use it in GitHub Desktop.
Deploying custom artifact with POM dependencies using Gradle 'maven-publish'
This file contains 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
File pluginZip = project.file("grails-${project.name}-${version}.zip") | |
assemble.outputs.file pluginZip | |
project.components.add(new JavaLibrary( | |
new org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact( | |
project.name, | |
'zip', | |
'zip', | |
'', | |
new Date(pluginZip.lastModified()), | |
pluginZip, | |
assemble | |
), | |
project.configurations.runtime.allDependencies) { | |
@Override | |
public String getName() { | |
return "grailsPlugin"; | |
} | |
}) | |
publishing { | |
publications { | |
artifact(MavenPublication) { | |
from components.grailsPlugin | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment