Last active
September 17, 2015 23:32
-
-
Save jkschneider/885dea988a215db49f43 to your computer and use it in GitHub Desktop.
Alteration to default behavior of nebula-publish (and indeed Gradle's maven-publish behavior) to produce compile scoped dependencies in the POM
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 { | |
nebula(MavenPublication) { | |
pom.withXml { | |
configurations.compile.resolvedConfiguration.firstLevelModuleDependencies.each { dep -> | |
asNode().dependencies[0].dependency.find { | |
it.artifactId[0].text() == dep.moduleName && | |
it.groupId[0].text() == dep.moduleGroup | |
}.scope[0].value = 'compile' | |
} | |
} | |
} | |
} | |
} |
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 { | |
nebula(MavenPublication) { | |
pom.withXml { | |
asNode().dependencies[0].dependency.find { it.artifactId[0].text() == 'rxjava' }.scope[0].value = 'compile' | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment