aboutsummaryrefslogtreecommitdiff
path: root/buildSrc/README.md
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 /buildSrc/README.md
parent9c00231884c69456c2deb2918cd0ecd50f3ac0a0 (diff)
downloadkau-3a92363e65a29b6106cdfa98d6bcf297b0eda5ad.tar.gz
kau-3a92363e65a29b6106cdfa98d6bcf297b0eda5ad.tar.bz2
kau-3a92363e65a29b6106cdfa98d6bcf297b0eda5ad.zip
Create buildSrc
Diffstat (limited to 'buildSrc/README.md')
-rw-r--r--buildSrc/README.md92
1 files changed, 92 insertions, 0 deletions
diff --git a/buildSrc/README.md b/buildSrc/README.md
new file mode 100644
index 0000000..60d2dfc
--- /dev/null
+++ b/buildSrc/README.md
@@ -0,0 +1,92 @@
+# KAU :gradle-plugin
+
+> Plugin helper for KAU
+
+KAU holds quite a big collection of projects, with the intent on making it easy to reuse complex features, and also to update.
+This plugin aims to help maintain version updates straight from the source, and also adds on a few nice functions.
+
+As a note, this is located under `buildSrc` as it is automatically included when building KAU.
+Everything here is used when generating the library, so it's always tested.
+
+## Contents
+* [Versions](#versions)
+* [Plugins](#plugins)
+* [Dependencies](#dependencies)
+* [Changelog Generator](#changelog-generator)
+
+## Usage
+
+Firstly, add KAU to the buildscript:
+
+```gradle
+buildscript {
+ repositories {
+ ...
+ maven { url "https://jitpack.io" }
+ }
+
+ dependencies {
+ ...
+ classpath "ca.allanwang:kau:${KAU}"
+ }
+}
+```
+
+Then where necessary, apply the plugin using
+
+```gradle
+apply plugin: 'ca.allanwang.kau'
+```
+
+# Versions
+
+> [Versions.groovy](/buildSrc/src/main/groovy/ca/allanwang/kau/Versions.groovy)
+
+Contains the version code for any external library used in KAU.
+You are free to use the values through `kau.[tagName]`.
+
+As an example, AppCompat is imported in KAU using
+
+```gradle
+api "com.android.support:appcompat-v7:${kau.supportLibs}"
+```
+
+# Plugins
+
+> [Plugins.groovy](/buildSrc/src/main/groovy/ca/allanwang/kau/Plugins.groovy)
+
+Unfortunately, it seems like you can't use the plugin directly in the buildscript, so this is mainly internal.
+
+The plugins data, found using `kauPlugins.[tagName]` contains a collection of useful plugin classpaths.
+The versions are taken from `Versions.groovy`, so it is always in sync.
+
+# Dependencies
+
+> [Dependencies.groovy](/buildSrc/src/main/groovy/ca/allanwang/kau/Dependencies.groovy)
+
+Contains the dependency string for common libraries.
+You are free to use the values through `kauDependency.[tagName]`.
+
+As an example, adding junit can be done through
+
+```gradle
+testImplementation kauDependency.junit
+```
+
+# Changelog Generator
+
+In conjunction with [core](/core#changelog-xml),
+the xml changelog can be converted to markdown.
+
+To allow for compilation per build, add your own task:
+
+```gradle
+task generateChangelogMd() {
+ kauChangelog.generate([inputPath], [outputPath])
+}
+```
+
+The wrapper allows for the generator to be called automatically with each build.
+
+
+