aboutsummaryrefslogtreecommitdiff
path: root/buildSrc/src/main/kotlin/ca/allanwang/kau/ChangelogGenerator.kt
diff options
context:
space:
mode:
Diffstat (limited to 'buildSrc/src/main/kotlin/ca/allanwang/kau/ChangelogGenerator.kt')
-rw-r--r--buildSrc/src/main/kotlin/ca/allanwang/kau/ChangelogGenerator.kt6
1 files changed, 2 insertions, 4 deletions
diff --git a/buildSrc/src/main/kotlin/ca/allanwang/kau/ChangelogGenerator.kt b/buildSrc/src/main/kotlin/ca/allanwang/kau/ChangelogGenerator.kt
index 5e21b7e..66f28f9 100644
--- a/buildSrc/src/main/kotlin/ca/allanwang/kau/ChangelogGenerator.kt
+++ b/buildSrc/src/main/kotlin/ca/allanwang/kau/ChangelogGenerator.kt
@@ -3,7 +3,6 @@ package ca.allanwang.kau
import groovy.util.Node
import groovy.util.XmlParser
import org.gradle.api.GradleException
-import org.gradle.api.Project
import java.io.File
/**
@@ -20,7 +19,7 @@ import java.io.File
*
* Outputs a changelog in markdown format
*/
-open class ChangelogGenerator(private val project: Project) {
+object ChangelogGenerator {
class ChangelogException(message: String) : GradleException(message)
@@ -71,8 +70,7 @@ open class ChangelogGenerator(private val project: Project) {
return entries
}
- @JvmOverloads
- fun generate(inputUri: String, outputUri: String = "${project.rootDir}/docs/Changelog.md"): List<ChangelogEntry> {
+ fun generate(inputUri: String, outputUri: String): List<ChangelogEntry> {
val entries = read(inputUri)
val output = File(outputUri)
if (output.exists()) {