Skip to content

Commit 440c314

Browse files
committed
ci: Try with new gradle plugin
1 parent 234a671 commit 440c314

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

ibm-watson/build.gradle

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ apply plugin: 'maven'
1414
apply plugin: 'signing'
1515
apply plugin: 'checkstyle'
1616
apply plugin: 'eclipse'
17+
apply plugin: 'maven-publish'
1718

1819
project.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)

0 commit comments

Comments
 (0)