mirror of
https://github.com/AllanWang/Frost-for-Facebook.git
synced 2024-11-08 20:12:39 +01:00
dc409d14c2
* Use kts for settings * Update whatsnew automatically * Remove changelog length check
50 lines
1.7 KiB
Groovy
50 lines
1.7 KiB
Groovy
buildscript {
|
|
repositories {
|
|
google()
|
|
jcenter()
|
|
maven { url "https://jitpack.io" }
|
|
maven { url "https://plugins.gradle.org/m2/" }
|
|
}
|
|
|
|
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}"
|
|
}
|
|
|
|
wrapper.setDistributionType(Wrapper.DistributionType.ALL)
|
|
}
|
|
|
|
apply plugin: "ca.allanwang.kau"
|
|
|
|
task clean(type: Delete) {
|
|
delete rootProject.buildDir
|
|
}
|
|
|
|
task generateChangelogMd() {
|
|
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) {
|
|
tasks = ['clean', 'lintRelease', 'test', 'assembleRelease']
|
|
}
|