-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Remove accidentally leaked kotlin stdlib dependency.
- Loading branch information
Showing
1 changed file
with
21 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,8 @@ | |
* limitations under the License. | ||
*/ | ||
|
||
import groovy.util.Node | ||
import groovy.util.NodeList | ||
import se.bjurr.gitchangelog.api.model.Tag | ||
import se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask | ||
import se.bjurr.gitchangelog.plugin.gradle.HelperParam | ||
|
@@ -57,6 +59,14 @@ publishing { | |
developerConnection.set("scm:git:[email protected]:nstdio/http-client-ext.git") | ||
url.set("https://github.com/nstdio/http-client-ext") | ||
} | ||
|
||
withXml { | ||
val root = asNode() | ||
val nodes = root["dependencies"] as NodeList | ||
if (nodes.isNotEmpty()) { | ||
root.remove(nodes.first() as Node) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
@@ -90,20 +100,17 @@ tasks.withType<AbstractArchiveTask>().configureEach { | |
tasks.create("changelog", GitChangelogTask::class) { | ||
fromRepo = project.rootDir.path | ||
file = File("CHANGELOG.md") | ||
handlebarsHelpers = listOf( | ||
HelperParam("shortHash") { _: Any, options -> | ||
return@HelperParam options.get<String>("hash").substring(0, 7) | ||
}, | ||
HelperParam("compare") { _, options -> | ||
val tagNames = options.get<List<Tag>>("tags").map { it.name } | ||
val name = options.get<String>("name") | ||
val prevTagIdx = tagNames.indexOf(name) + 1 | ||
val compare = name.takeIf { it != "Unreleased" } ?: "HEAD" | ||
|
||
return@HelperParam if (prevTagIdx < tagNames.size) "compare/${tagNames[prevTagIdx]}...$compare" | ||
else "releases/tag/$name" | ||
} | ||
) | ||
handlebarsHelpers = listOf(HelperParam("shortHash") { _: Any, options -> | ||
return@HelperParam options.get<String>("hash").substring(0, 7) | ||
}, HelperParam("compare") { _, options -> | ||
val tagNames = options.get<List<Tag>>("tags").map { it.name } | ||
val name = options.get<String>("name") | ||
val prevTagIdx = tagNames.indexOf(name) + 1 | ||
val compare = name.takeIf { it != "Unreleased" } ?: "HEAD" | ||
|
||
return@HelperParam if (prevTagIdx < tagNames.size) "compare/${tagNames[prevTagIdx]}...$compare" | ||
else "releases/tag/$name" | ||
}) | ||
|
||
doFirst { | ||
templateContent = file("changelog.mustache").readText() | ||
|