Mark runtime dependency as provided in pom.

This commit is contained in:
Jeremy Wood 2023-08-24 13:49:48 -04:00
parent ee5408764f
commit bae909a9e8
No known key found for this signature in database
GPG Key ID: C5BAD04C77B91B4B
1 changed files with 10 additions and 0 deletions

View File

@ -104,6 +104,16 @@ publishing {
publications {
maven(MavenPublication) {
from components.java
pom.withXml {
asNode().dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.implementation.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each() {
it.scope*.value = 'provided'
}
}
}
}
repositories {