|
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | 16 |
|
| 17 | +import groovy.util.Node |
| 18 | +import groovy.util.NodeList |
17 | 19 | import se.bjurr.gitchangelog.api.model.Tag |
18 | 20 | import se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask |
19 | 21 | import se.bjurr.gitchangelog.plugin.gradle.HelperParam |
@@ -57,6 +59,14 @@ publishing { |
57 | 59 | developerConnection.set( "scm:git:[email protected]:nstdio/http-client-ext.git") |
58 | 60 | url.set("https://github.com/nstdio/http-client-ext") |
59 | 61 | } |
| 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 | + } |
60 | 70 | } |
61 | 71 | } |
62 | 72 | } |
@@ -90,20 +100,17 @@ tasks.withType<AbstractArchiveTask>().configureEach { |
90 | 100 | tasks.create("changelog", GitChangelogTask::class) { |
91 | 101 | fromRepo = project.rootDir.path |
92 | 102 | 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 | + }) |
107 | 114 |
|
108 | 115 | doFirst { |
109 | 116 | templateContent = file("changelog.mustache").readText() |
|
0 commit comments