aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-01-24 23:44:49 -0500
committerAllan Wang <me@allanwang.ca>2018-01-24 23:44:49 -0500
commit3a92363e65a29b6106cdfa98d6bcf297b0eda5ad (patch)
tree9c61fbce5d486374aad1e7767ebc2ee6f67348cc /build.gradle
parent9c00231884c69456c2deb2918cd0ecd50f3ac0a0 (diff)
downloadkau-3a92363e65a29b6106cdfa98d6bcf297b0eda5ad.tar.gz
kau-3a92363e65a29b6106cdfa98d6bcf297b0eda5ad.tar.bz2
kau-3a92363e65a29b6106cdfa98d6bcf297b0eda5ad.zip
Create buildSrc
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle42
1 files changed, 19 insertions, 23 deletions
diff --git a/build.gradle b/build.gradle
index 0905ce0..341dcd1 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,44 +1,40 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
+ maven { url "https://plugins.gradle.org/m2/" }
}
+
+ apply plugin: "ca.allanwang.kau"
+
dependencies {
- classpath 'com.android.tools.build:gradle:3.0.1'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${KOTLIN}"
- classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
- classpath 'com.github.triplet.gradle:play-publisher:1.2.0'
- classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2'
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
+ classpath kauPlugin.android
+ classpath kauPlugin.kotlin
+ classpath kauPlugin.androidMaven
+ classpath kauPlugin.playPublisher
+ classpath kauPlugin.dexCount
+ classpath kauPlugin.gitVersion
}
}
+apply plugin: "ca.allanwang.kau"
+
task clean(type: Delete) {
delete rootProject.buildDir
}
task generateChangelogMd {
- def parsedProjectXml = (new XmlParser()).parse("$project.rootDir/sample/src/main/res/xml/kau_changelog.xml")
- def sw = new StringWriter()
- sw.append("# Changelog\n")
- parsedProjectXml.depthFirst().each {
- switch (it.name()) {
- case "version":
- sw.append("\n## ${it.@title}\n")
- break
- case "item":
- if (it.@text?.trim())
- sw.append("* ${it.@text}\n")
- }
- }
- def changelogMd = new File("$project.rootDir/docs/Changelog.md")
- changelogMd.write(sw.toString())
+ kauChangelog.generate("$project.rootDir/sample/src/main/res/xml/kau_changelog.xml")
}
subprojects {
+
+ if (it.name == 'gradle-plugin')
+ return
+
+ apply plugin: 'com.gladed.androidgitversion'
+
repositories {
google()
jcenter()