aboutsummaryrefslogtreecommitdiff
path: root/buildSrc/README.md
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-06-07 15:04:33 -0400
committerAllan Wang <me@allanwang.ca>2019-06-07 15:04:33 -0400
commit7809e09bab7ce7ed17d8236892674d662dc6b8af (patch)
treeb961c6a366967f4994cd2f1ac7e0e25d008ba1d5 /buildSrc/README.md
parentdf94b2f706c25514afc447c2cd37ea01dd821cf1 (diff)
downloadkau-7809e09bab7ce7ed17d8236892674d662dc6b8af.tar.gz
kau-7809e09bab7ce7ed17d8236892674d662dc6b8af.tar.bz2
kau-7809e09bab7ce7ed17d8236892674d662dc6b8af.zip
Update gradle plugin docs
Diffstat (limited to 'buildSrc/README.md')
-rw-r--r--buildSrc/README.md72
1 files changed, 22 insertions, 50 deletions
diff --git a/buildSrc/README.md b/buildSrc/README.md
index f79303c..14ae3d6 100644
--- a/buildSrc/README.md
+++ b/buildSrc/README.md
@@ -5,75 +5,47 @@
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.
+As a note, this is located under `buildSrc` as it is automatically included when building
Everything here is used when generating the library, so it's always tested.
## Contents
-* [kau.Versions](#versions)
-* [kau.Plugins](#plugins)
-* [kau.Dependencies](#dependencies)
+* [Usage](#usage)
+* [Constants](#constants)
* [Changelog Generator](#changelog-generator)
## Usage
-Firstly, add KAU to the buildscript:
+The easiest way to use this is to create your own `buildSrc` folder, and include `ca.allanwang.kau:gradle-plugin:${KAU}` as a dependency.
+This way, you can also use items in your buildscript.
+You can also add your own classes to manage versions in your app.
-```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'
-```
-
-# kau.Versions
-
-> [kau.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
+When making your own `buildSrc`, make sure you add the jitpack repository:
```gradle
-api "androidx.appcompat:appcompat:${kau.appcompat}"
+repositories {
+ ...
+ maven { url "https://jitpack.io" }
+}
```
-# kau.Plugins
+---
-> [kau.Plugins.groovy](/buildSrc/src/main/groovy/ca/allanwang/kau/Plugins.groovy)
+Currently, the plugin is a collection of simple classes.
-Unfortunately, it seems like you can't use the plugin directly in the buildscript, so this is mainly internal.
+## Constants
-The plugins data, found using `kauPlugins.[tagName]` contains a collection of useful plugin classpaths.
-The versions are taken from `kau.Versions.groovy`, so it is always in sync.
+`Versions`, `Plugins`, and `Dependencies` supply constants you can use for your classpath and dependencies
-# kau.Dependencies
-
-> [kau.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 `kau.Dependencies.[tagName]`.
-
-As an example, adding junit can be done through
+Eg
```gradle
-testImplementation kau.Dependencies.junit
+dependencies {
+ ...
+ implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${kau.Versions.coroutines}"
+}
```
-# Changelog Generator
+## Changelog Generator
In conjunction with [core](/core#changelog-xml),
the xml changelog can be converted to markdown.
@@ -82,7 +54,7 @@ To allow for compilation per build, add your own task:
```gradle
task generateChangelogMd() {
- kauChangelog.generate([inputPath], [outputPath])
+ kau.ChangelogGenerator.generate([inputPath], [outputPath])
}
```