diff options
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/build.gradle b/build.gradle index 33031d0b..cc64b047 100644 --- a/build.gradle +++ b/build.gradle @@ -7,27 +7,37 @@ buildscript { } dependencies { - classpath "ca.allanwang:kau:${KAU}" -// classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta02' - classpath "com.android.tools.build:gradle:${ANDROID_GRADLE}" - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${KOTLIN}" - classpath "com.bugsnag:bugsnag-android-gradle-plugin:${BUGSNAG_PLUGIN}" - classpath "com.diffplug.spotless:spotless-plugin-gradle:${SPOTLESS}" - classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:${DEX_PLUGIN}" - classpath "com.gladed.androidgitversion:gradle-android-git-version:${GIT_PLUGIN}" + classpath kau.Plugins.android + classpath kau.Plugins.kotlin + classpath kau.Plugins.bugsnag + classpath kau.Plugins.spotless + classpath kau.Plugins.dexCount + classpath kau.Plugins.gitVersion } wrapper.setDistributionType(Wrapper.DistributionType.ALL) } -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 = kau.ChangelogGenerator.generate("${project.rootDir}/app/src/main/res/xml/frost_changelog.xml", "${project.rootDir}/docs/Changelog.md") + // 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) { |