Skip to content

Commit ea66180

Browse files
committed
chore: Remove accidentally leaked kotlin stdlib dependency.
1 parent c950a5c commit ea66180

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

buildSrc/src/main/kotlin/io.github.nstdio.http.ext.publish-conventions.gradle.kts

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17+
import groovy.util.Node
18+
import groovy.util.NodeList
1719
import se.bjurr.gitchangelog.api.model.Tag
1820
import se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask
1921
import se.bjurr.gitchangelog.plugin.gradle.HelperParam
@@ -57,6 +59,14 @@ publishing {
5759
developerConnection.set("scm:git:[email protected]:nstdio/http-client-ext.git")
5860
url.set("https://github.com/nstdio/http-client-ext")
5961
}
62+
63+
withXml {
64+
val root = asNode()
65+
val nodes = root["dependencies"] as NodeList
66+
if (nodes.isNotEmpty()) {
67+
root.remove(nodes.first() as Node)
68+
}
69+
}
6070
}
6171
}
6272
}
@@ -90,20 +100,17 @@ tasks.withType<AbstractArchiveTask>().configureEach {
90100
tasks.create("changelog", GitChangelogTask::class) {
91101
fromRepo = project.rootDir.path
92102
file = File("CHANGELOG.md")
93-
handlebarsHelpers = listOf(
94-
HelperParam("shortHash") { _: Any, options ->
95-
return@HelperParam options.get<String>("hash").substring(0, 7)
96-
},
97-
HelperParam("compare") { _, options ->
98-
val tagNames = options.get<List<Tag>>("tags").map { it.name }
99-
val name = options.get<String>("name")
100-
val prevTagIdx = tagNames.indexOf(name) + 1
101-
val compare = name.takeIf { it != "Unreleased" } ?: "HEAD"
102-
103-
return@HelperParam if (prevTagIdx < tagNames.size) "compare/${tagNames[prevTagIdx]}...$compare"
104-
else "releases/tag/$name"
105-
}
106-
)
103+
handlebarsHelpers = listOf(HelperParam("shortHash") { _: Any, options ->
104+
return@HelperParam options.get<String>("hash").substring(0, 7)
105+
}, HelperParam("compare") { _, options ->
106+
val tagNames = options.get<List<Tag>>("tags").map { it.name }
107+
val name = options.get<String>("name")
108+
val prevTagIdx = tagNames.indexOf(name) + 1
109+
val compare = name.takeIf { it != "Unreleased" } ?: "HEAD"
110+
111+
return@HelperParam if (prevTagIdx < tagNames.size) "compare/${tagNames[prevTagIdx]}...$compare"
112+
else "releases/tag/$name"
113+
})
107114

108115
doFirst {
109116
templateContent = file("changelog.mustache").readText()

0 commit comments

Comments
 (0)