Skip to content

Commit 6c99436

Browse files
authored
add script to add compile only dependencies in pom file (#100)
* add script to add compile only dependencies in pom file when publish to maven local * add comment to explain the script task
1 parent d8f6642 commit 6c99436

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

azurefunctions/build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,19 @@ publishing {
5252
developerConnection = "scm:git:[email protected]:microsoft/durabletask-java"
5353
url = "https://github.com/microsoft/durabletask-java/tree/main/azurefunctions"
5454
}
55+
// use below script to include compile-only dependencies when generated pom file.
56+
// This is pain point when we onboard API docs as the missing compile-only dependencies crash the
57+
// API doc's team onboarding pipeline.
58+
withXml {
59+
project.configurations.compileOnly.allDependencies.each { dependency ->
60+
asNode().dependencies[0].appendNode("dependency").with {
61+
it.appendNode("groupId", dependency.group)
62+
it.appendNode("artifactId", dependency.name)
63+
it.appendNode("version", dependency.version)
64+
it.appendNode("scope", "provided")
65+
}
66+
}
67+
}
5568
}
5669
}
5770
}

client/build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,19 @@ publishing {
122122
developerConnection = "scm:git:[email protected]:microsoft/durabletask-java"
123123
url = "https://github.com/microsoft/durabletask-java/tree/main/client"
124124
}
125+
// use below script to include compile-only dependencies when generated pom file.
126+
// This is pain point when we onboard API docs as the missing compile-only dependencies crash the
127+
// API doc's team onboarding pipeline.
128+
withXml {
129+
project.configurations.compileOnly.allDependencies.each { dependency ->
130+
asNode().dependencies[0].appendNode("dependency").with {
131+
it.appendNode("groupId", dependency.group)
132+
it.appendNode("artifactId", dependency.name)
133+
it.appendNode("version", dependency.version)
134+
it.appendNode("scope", "provided")
135+
}
136+
}
137+
}
125138
}
126139
}
127140
}

0 commit comments

Comments
 (0)