Created
February 26, 2016 16:07
-
-
Save bugs84/b7887fb5d7f9f2d484b8 to your computer and use it in GitHub Desktop.
maven-publish plugin. Hook, change in published pom.xml 'runtime' dependency to compile dependency.
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
publishing.publications.all { | |
pom.withXml { | |
asNode().dependencies.'*'.findAll() { | |
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep -> | |
dep.name == it.artifactId.text() | |
} | |
}.each { it.scope*.value = 'compile'} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment