File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed
Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ apply plugin: 'maven'
1414apply plugin : ' signing'
1515apply plugin : ' checkstyle'
1616apply plugin : ' eclipse'
17+ apply plugin : ' maven-publish'
1718
1819project. tasks. assemble. dependsOn project. tasks. shadowJar
1920
@@ -104,7 +105,7 @@ processResources {
104105 ]
105106}
106107
107- task writeNewPom {
108+ /* task writeNewPom {
108109 doLast {
109110 pom {
110111 project {
@@ -152,6 +153,31 @@ task writeNewPom {
152153 }
153154 }.writeTo("$buildDir/poms/pom-default.xml")
154155 }
156+ }*/
157+
158+ publishing {
159+ publications {
160+ maven(MavenPublication ) {
161+ from components. java
162+ pom. withXml {
163+ asNode(). dependencies. ' *' . findAll() {
164+ it. scope. text() == ' runtime' && project. configurations. compile. allDependencies. find { dep ->
165+ dep. name == it. artifactId. text()
166+ }
167+ }. each() {
168+ it. scope* . value = ' compile'
169+ }
170+ }
171+ }
172+ }
173+ }
174+
175+
176+
177+ model {
178+ tasks. generatePomFileForMavenPublication {
179+ destination = file(" $buildDir /poms/pom-default.xml" )
180+ }
155181}
156182
157- install. finalizedBy(writeNewPom)
183+ // install.finalizedBy(writeNewPom)
You can’t perform that action at this time.
0 commit comments