-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpublish.gradle
32 lines (30 loc) · 1.05 KB
/
publish.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
apply plugin:"maven-publish"
publishing {
repositories {
maven {
name 'GitHubPackages'
url uri("https://maven.pkg.github.com/atlasoflivingaustralia/fieldcapture")
credentials {
username = System.getenv('GITHUB_ACTOR')
password = System.getenv('GITHUB_TOKEN')
}
}
}
publications {
mavenJar(MavenPublication) {
pom.withXml {
def pomNode = asNode()
pomNode.dependencyManagement.replaceNode {}
// simply remove dependencies without a version
// version-less dependencies are handled with dependencyManagement
// see https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/8 for more complete solutions
pomNode.dependencies.dependency.findAll {
it.version.text().isEmpty()
}.each {
it.replaceNode {}
}
}
artifact bootJar
}
}
}