aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--about/build.gradle2
-rw-r--r--adapter/build.gradle6
-rw-r--r--android-lib.gradle20
-rw-r--r--build.gradle16
-rw-r--r--buildSrc/README.md24
-rw-r--r--buildSrc/build.gradle.kts2
-rw-r--r--buildSrc/src/main/kotlin/kau/ChangelogGenerator.kt (renamed from buildSrc/src/main/kotlin/ChangelogGenerator.kt)2
-rw-r--r--buildSrc/src/main/kotlin/kau/Dependencies.kt (renamed from buildSrc/src/main/kotlin/Dependencies.kt)2
-rw-r--r--buildSrc/src/main/kotlin/kau/Plugins.kt (renamed from buildSrc/src/main/kotlin/Plugins.kt)2
-rw-r--r--buildSrc/src/main/kotlin/kau/Versions.kt (renamed from buildSrc/src/main/kotlin/Versions.kt)2
-rw-r--r--colorpicker/build.gradle4
-rw-r--r--core-ui/build.gradle2
-rw-r--r--core/build.gradle22
-rw-r--r--kpref-activity/build.gradle2
-rw-r--r--mediapicker/build.gradle6
-rw-r--r--sample/build.gradle26
16 files changed, 74 insertions, 66 deletions
diff --git a/about/build.gradle b/about/build.gradle
index 3aa9ef2..7578ce0 100644
--- a/about/build.gradle
+++ b/about/build.gradle
@@ -10,7 +10,7 @@ dependencies {
implementation project(':core-ui')
implementation project(':adapter')
- api("com.mikepenz:aboutlibraries:${Versions.aboutLibraries}@aar") {
+ api("com.mikepenz:aboutlibraries:${kau.Versions.aboutLibraries}@aar") {
transitive = false
}
}
diff --git a/adapter/build.gradle b/adapter/build.gradle
index 8826c7d..a37330e 100644
--- a/adapter/build.gradle
+++ b/adapter/build.gradle
@@ -1,12 +1,12 @@
-ext.kauSubModuleMinSdk = Versions.coreMinSdk
+ext.kauSubModuleMinSdk = kau.Versions.coreMinSdk
apply from: '../android-lib.gradle'
dependencies {
implementation project(':core')
- api "com.mikepenz:fastadapter-commons:${Versions.fastAdapterCommons}@aar"
- api "com.mikepenz:fastadapter:${Versions.fastAdapter}@aar"
+ api "com.mikepenz:fastadapter-commons:${kau.Versions.fastAdapterCommons}@aar"
+ api "com.mikepenz:fastadapter:${kau.Versions.fastAdapter}@aar"
}
apply from: '../artifacts.gradle'
diff --git a/android-lib.gradle b/android-lib.gradle
index 598ddcb..2d44be1 100644
--- a/android-lib.gradle
+++ b/android-lib.gradle
@@ -6,15 +6,15 @@ apply plugin: 'com.getkeepsafe.dexcount'
group = "ca.allanwang"
android {
- compileSdkVersion Versions.targetSdk
- buildToolsVersion Versions.buildTools
+ compileSdkVersion kau.Versions.targetSdk
+ buildToolsVersion kau.Versions.buildTools
androidGitVersion {
codeFormat = 'MMNNPPXX'
format = '%tag%%.count%%-commit%'
}
- def kauMinSdk = Versions.minSdk
+ def kauMinSdk = kau.Versions.minSdk
if (project.hasProperty('kauSubModuleMinSdk'))
kauMinSdk = kauSubModuleMinSdk
@@ -26,7 +26,7 @@ android {
defaultConfig {
minSdkVersion kauMinSdk
- targetSdkVersion Versions.targetSdk
+ targetSdkVersion kau.Versions.targetSdk
versionName androidGitVersion.name()
versionCode androidGitVersion.code()
consumerProguardFiles 'progress-proguard.txt'
@@ -87,11 +87,11 @@ android {
}
dependencies {
- testImplementation Dependencies.kotlinTest
- testImplementation Dependencies.junit
+ testImplementation kau.Dependencies.kotlinTest
+ testImplementation kau.Dependencies.junit
- androidTestImplementation Dependencies.kotlinTest
- androidTestImplementation Dependencies.espresso
- androidTestImplementation Dependencies.testRules
- androidTestImplementation Dependencies.testRunner
+ androidTestImplementation kau.Dependencies.kotlinTest
+ androidTestImplementation kau.Dependencies.espresso
+ androidTestImplementation kau.Dependencies.testRules
+ androidTestImplementation kau.Dependencies.testRunner
} \ No newline at end of file
diff --git a/build.gradle b/build.gradle
index bcdff15..81655fb 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,13 +7,13 @@ buildscript {
}
dependencies {
- classpath Plugins.android
- classpath Plugins.kotlin
- classpath Plugins.androidMaven
- classpath Plugins.playPublisher
- classpath Plugins.dexCount
- classpath Plugins.gitVersion
- classpath Plugins.spotless
+ classpath kau.Plugins.android
+ classpath kau.Plugins.kotlin
+ classpath kau.Plugins.androidMaven
+ classpath kau.Plugins.playPublisher
+ classpath kau.Plugins.dexCount
+ classpath kau.Plugins.gitVersion
+ classpath kau.Plugins.spotless
}
wrapper.setDistributionType(Wrapper.DistributionType.ALL)
@@ -24,7 +24,7 @@ task clean(type: Delete) {
}
task generateChangelogMd {
- ChangelogGenerator.generate("${project.rootDir}/sample/src/main/res/xml/kau_changelog.xml", "${project.rootDir}/docs/Changelog.md")
+ kau.ChangelogGenerator.generate("${project.rootDir}/sample/src/main/res/xml/kau_changelog.xml", "${project.rootDir}/docs/Changelog.md")
}
subprojects {
diff --git a/buildSrc/README.md b/buildSrc/README.md
index 8889675..f79303c 100644
--- a/buildSrc/README.md
+++ b/buildSrc/README.md
@@ -9,9 +9,9 @@ As a note, this is located under `buildSrc` as it is automatically included when
Everything here is used when generating the library, so it's always tested.
## Contents
-* [Versions](#versions)
-* [Plugins](#plugins)
-* [Dependencies](#dependencies)
+* [kau.Versions](#versions)
+* [kau.Plugins](#plugins)
+* [kau.Dependencies](#dependencies)
* [Changelog Generator](#changelog-generator)
## Usage
@@ -38,9 +38,9 @@ Then where necessary, apply the plugin using
apply plugin: 'ca.allanwang.kau'
```
-# Versions
+# kau.Versions
-> [Versions.groovy](/buildSrc/src/main/groovy/ca/allanwang/kau/Versions.groovy)
+> [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]`.
@@ -51,26 +51,26 @@ As an example, AppCompat is imported in KAU using
api "androidx.appcompat:appcompat:${kau.appcompat}"
```
-# Plugins
+# kau.Plugins
-> [Plugins.groovy](/buildSrc/src/main/groovy/ca/allanwang/kau/Plugins.groovy)
+> [kau.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.
+The versions are taken from `kau.Versions.groovy`, so it is always in sync.
-# Dependencies
+# kau.Dependencies
-> [Dependencies.groovy](/buildSrc/src/main/groovy/ca/allanwang/kau/Dependencies.groovy)
+> [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 `Dependencies.[tagName]`.
+You are free to use the values through `kau.Dependencies.[tagName]`.
As an example, adding junit can be done through
```gradle
-testImplementation Dependencies.junit
+testImplementation kau.Dependencies.junit
```
# Changelog Generator
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
index 9bd5e13..89cba29 100644
--- a/buildSrc/build.gradle.kts
+++ b/buildSrc/build.gradle.kts
@@ -6,5 +6,5 @@ plugins {
group = "ca.allanwang"
repositories {
- mavenCentral()
+ jcenter()
} \ No newline at end of file
diff --git a/buildSrc/src/main/kotlin/ChangelogGenerator.kt b/buildSrc/src/main/kotlin/kau/ChangelogGenerator.kt
index 4be3ecf..20e8eef 100644
--- a/buildSrc/src/main/kotlin/ChangelogGenerator.kt
+++ b/buildSrc/src/main/kotlin/kau/ChangelogGenerator.kt
@@ -1,3 +1,5 @@
+package kau
+
import groovy.util.Node
import groovy.util.XmlParser
import org.gradle.api.GradleException
diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/kau/Dependencies.kt
index 3fd40ed..62c938c 100644
--- a/buildSrc/src/main/kotlin/Dependencies.kt
+++ b/buildSrc/src/main/kotlin/kau/Dependencies.kt
@@ -1,3 +1,5 @@
+package kau
+
/**
* Some common dependencies, backed by the supplied versions
*/
diff --git a/buildSrc/src/main/kotlin/Plugins.kt b/buildSrc/src/main/kotlin/kau/Plugins.kt
index e321628..cdee364 100644
--- a/buildSrc/src/main/kotlin/Plugins.kt
+++ b/buildSrc/src/main/kotlin/kau/Plugins.kt
@@ -1,3 +1,5 @@
+package kau
+
/**
* Some common buildscript plugins, backed by the supplied versions
*/
diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/kau/Versions.kt
index 7f4cdca..32db3a5 100644
--- a/buildSrc/src/main/kotlin/Versions.kt
+++ b/buildSrc/src/main/kotlin/kau/Versions.kt
@@ -1,3 +1,5 @@
+package kau
+
object Versions {
const val coreMinSdk = 19
const val minSdk = 21
diff --git a/colorpicker/build.gradle b/colorpicker/build.gradle
index 33e73cc..0b58996 100644
--- a/colorpicker/build.gradle
+++ b/colorpicker/build.gradle
@@ -1,13 +1,13 @@
ext.kauSubModuleResourcePrefix = "kau_color_"
-ext.kauSubModuleMinSdk = Versions.coreMinSdk
+ext.kauSubModuleMinSdk = kau.Versions.coreMinSdk
apply from: '../android-lib.gradle'
dependencies {
implementation project(':core')
- implementation "com.afollestad.material-dialogs:color:${Versions.materialDialog}"
+ implementation "com.afollestad.material-dialogs:color:${kau.Versions.materialDialog}"
}
apply from: '../artifacts.gradle'
diff --git a/core-ui/build.gradle b/core-ui/build.gradle
index 816e53a..c2732c6 100644
--- a/core-ui/build.gradle
+++ b/core-ui/build.gradle
@@ -1,4 +1,4 @@
-ext.kauSubModuleMinSdk = Versions.coreMinSdk
+ext.kauSubModuleMinSdk = kau.Versions.coreMinSdk
apply from: '../android-lib.gradle'
diff --git a/core/build.gradle b/core/build.gradle
index 0cba076..43cdc6d 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -1,22 +1,22 @@
-ext.kauSubModuleMinSdk = Versions.coreMinSdk
+ext.kauSubModuleMinSdk = kau.Versions.coreMinSdk
apply from: '../android-lib.gradle'
dependencies {
- api Dependencies.kotlin
+ api kau.Dependencies.kotlin
- api "androidx.appcompat:appcompat:${Versions.appcompat}"
- api "androidx.recyclerview:recyclerview:${Versions.recyclerView}"
- api "androidx.cardview:cardview:${Versions.cardView}"
- api "androidx.constraintlayout:constraintlayout:${Versions.constraintLayout}"
- api "com.google.android.material:material:${Versions.googleMaterial}"
+ api "androidx.appcompat:appcompat:${kau.Versions.appcompat}"
+ api "androidx.recyclerview:recyclerview:${kau.Versions.recyclerView}"
+ api "androidx.cardview:cardview:${kau.Versions.cardView}"
+ api "androidx.constraintlayout:constraintlayout:${kau.Versions.constraintLayout}"
+ api "com.google.android.material:material:${kau.Versions.googleMaterial}"
- api "org.jetbrains.kotlinx:kotlinx-coroutines-android:${Versions.coroutines}"
+ api "org.jetbrains.kotlinx:kotlinx-coroutines-android:${kau.Versions.coroutines}"
- api "com.mikepenz:iconics-core:${Versions.iconics}@aar"
- api "com.mikepenz:google-material-typeface:${Versions.iconicsGoogle}.original@aar"
+ api "com.mikepenz:iconics-core:${kau.Versions.iconics}@aar"
+ api "com.mikepenz:google-material-typeface:${kau.Versions.iconicsGoogle}.original@aar"
- api "com.afollestad.material-dialogs:core:${Versions.materialDialog}"
+ api "com.afollestad.material-dialogs:core:${kau.Versions.materialDialog}"
}
apply from: '../artifacts.gradle'
diff --git a/kpref-activity/build.gradle b/kpref-activity/build.gradle
index f22a4a0..e2e2771 100644
--- a/kpref-activity/build.gradle
+++ b/kpref-activity/build.gradle
@@ -1,4 +1,4 @@
-ext.kauSubModuleMinSdk = Versions.coreMinSdk
+ext.kauSubModuleMinSdk = kau.Versions.coreMinSdk
ext.kauSubModuleResourcePrefix = "kau_pref_"
diff --git a/mediapicker/build.gradle b/mediapicker/build.gradle
index 3d4819a..5f4e6a7 100644
--- a/mediapicker/build.gradle
+++ b/mediapicker/build.gradle
@@ -1,4 +1,4 @@
-ext.kauSubModuleMinSdk = Versions.coreMinSdk
+ext.kauSubModuleMinSdk = kau.Versions.coreMinSdk
apply from: '../android-lib.gradle'
apply plugin: 'kotlin-kapt'
@@ -8,8 +8,8 @@ dependencies {
implementation project(':adapter')
//noinspection GradleDependency
- api "com.github.bumptech.glide:glide:${Versions.glide}"
- implementation "jp.wasabeef:blurry:${Versions.blurry}"
+ api "com.github.bumptech.glide:glide:${kau.Versions.glide}"
+ implementation "jp.wasabeef:blurry:${kau.Versions.blurry}"
}
apply from: '../artifacts.gradle'
diff --git a/sample/build.gradle b/sample/build.gradle
index 5f795db..e31a312 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -9,8 +9,8 @@ play {
}
android {
- compileSdkVersion Versions.targetSdk
- buildToolsVersion Versions.buildTools
+ compileSdkVersion kau.Versions.targetSdk
+ buildToolsVersion kau.Versions.buildTools
androidGitVersion {
codeFormat = 'MMNNPPXX'
@@ -19,8 +19,8 @@ android {
defaultConfig {
applicationId "ca.allanwang.kau.sample"
- minSdkVersion Versions.minSdk
- targetSdkVersion Versions.targetSdk
+ minSdkVersion kau.Versions.minSdk
+ targetSdkVersion kau.Versions.targetSdk
versionName androidGitVersion.name()
versionCode androidGitVersion.code()
multiDexEnabled true
@@ -127,15 +127,15 @@ dependencies {
implementation project(':searchview')
implementation project(':mediapicker')
- implementation "com.afollestad.material-dialogs:input:${Versions.materialDialog}"
+ implementation "com.afollestad.material-dialogs:input:${kau.Versions.materialDialog}"
- testImplementation Dependencies.kotlinTest
- testImplementation Dependencies.junit
+ testImplementation kau.Dependencies.kotlinTest
+ testImplementation kau.Dependencies.junit
- androidTestImplementation Dependencies.kotlinTest
- androidTestImplementation Dependencies.espresso
- androidTestImplementation "androidx.test.espresso:espresso-intents:${Versions.espresso}"
- androidTestImplementation "androidx.test.espresso:espresso-contrib:${Versions.espresso}"
- androidTestImplementation Dependencies.testRules
- androidTestImplementation Dependencies.testRunner
+ androidTestImplementation kau.Dependencies.kotlinTest
+ androidTestImplementation kau.Dependencies.espresso
+ androidTestImplementation "androidx.test.espresso:espresso-intents:${kau.Versions.espresso}"
+ androidTestImplementation "androidx.test.espresso:espresso-contrib:${kau.Versions.espresso}"
+ androidTestImplementation kau.Dependencies.testRules
+ androidTestImplementation kau.Dependencies.testRunner
}