aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-06-06 16:23:22 -0400
committerGitHub <noreply@github.com>2019-06-06 16:23:22 -0400
commitdc409d14c26a9cb6be4eecfb59e56f37207572c8 (patch)
tree2228e607efc3917ea8c38f83dfff21c4ea3fe5dd /build.gradle
parent17a6a36279f20974e4db8d7355e747f4f59c1af1 (diff)
downloadfrost-dc409d14c26a9cb6be4eecfb59e56f37207572c8.tar.gz
frost-dc409d14c26a9cb6be4eecfb59e56f37207572c8.tar.bz2
frost-dc409d14c26a9cb6be4eecfb59e56f37207572c8.zip
Enhancement/whatsnew (#1434)
* Use kts for settings * Update whatsnew automatically * Remove changelog length check
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle18
1 files changed, 16 insertions, 2 deletions
diff --git a/build.gradle b/build.gradle
index 33031d0b..7ccde02f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -20,14 +20,28 @@ buildscript {
wrapper.setDistributionType(Wrapper.DistributionType.ALL)
}
-apply plugin: 'ca.allanwang.kau'
+apply plugin: "ca.allanwang.kau"
task clean(type: Delete) {
delete rootProject.buildDir
}
task generateChangelogMd() {
- kauChangelog.generate("$project.rootDir/app/src/main/res/xml/frost_changelog.xml")
+ def changelog = kauChangelog.generate("${project.rootDir}/app/src/main/res/xml/frost_changelog.xml")
+ // If we have no changelog, something is wrong
+ def entry = changelog[0]
+ def whatsNewFile = new File("${project.rootDir}/app/src/main/play/en-US/whatsnew")
+ if (!whatsNewFile.exists()) {
+ // Throw exceptions so that moving this file will require us to update the script
+ throw new RuntimeException("Whatsnew file not found")
+ }
+ whatsNewFile.withWriter { writer ->
+ writer.write(entry.version)
+ writer.write("\n")
+ entry.items.each {
+ writer.write("\n* ${it}")
+ }
+ }
}
task fullRelease(type: GradleBuild) {