diff options
author | Allan Wang <me@allanwang.ca> | 2019-06-08 01:09:42 -0400 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-06-08 01:09:42 -0400 |
commit | c340f824a8a287cf5e5000a91b668be2e7fe3e0f (patch) | |
tree | c8ad475da88e1191f34f18b645d1ea4f29088ff4 | |
parent | 065f2db88e4b87b53b3216a5313d5e1e22fa2867 (diff) | |
download | kau-c340f824a8a287cf5e5000a91b668be2e7fe3e0f.tar.gz kau-c340f824a8a287cf5e5000a91b668be2e7fe3e0f.tar.bz2 kau-c340f824a8a287cf5e5000a91b668be2e7fe3e0f.zip |
Add many more dependency declarations in plugin
-rw-r--r-- | about/build.gradle | 4 | ||||
-rw-r--r-- | adapter/build.gradle | 4 | ||||
-rw-r--r-- | buildSrc/README.md | 9 | ||||
-rw-r--r-- | buildSrc/src/main/kotlin/kau/Dependencies.kt | 47 | ||||
-rw-r--r-- | buildSrc/src/main/kotlin/kau/Plugins.kt | 1 | ||||
-rw-r--r-- | buildSrc/src/main/kotlin/kau/Versions.kt | 10 | ||||
-rw-r--r-- | colorpicker/build.gradle | 2 | ||||
-rw-r--r-- | core/build.gradle | 18 | ||||
-rw-r--r-- | mediapicker/build.gradle | 5 | ||||
-rw-r--r-- | sample/build.gradle | 6 |
10 files changed, 78 insertions, 28 deletions
diff --git a/about/build.gradle b/about/build.gradle index 7578ce0..5a2a395 100644 --- a/about/build.gradle +++ b/about/build.gradle @@ -10,9 +10,7 @@ dependencies { implementation project(':core-ui') implementation project(':adapter') - api("com.mikepenz:aboutlibraries:${kau.Versions.aboutLibraries}@aar") { - transitive = false - } + api kau.Dependencies.aboutLibraries } apply from: '../artifacts.gradle' diff --git a/adapter/build.gradle b/adapter/build.gradle index a37330e..de42b6c 100644 --- a/adapter/build.gradle +++ b/adapter/build.gradle @@ -5,8 +5,8 @@ apply from: '../android-lib.gradle' dependencies { implementation project(':core') - api "com.mikepenz:fastadapter-commons:${kau.Versions.fastAdapterCommons}@aar" - api "com.mikepenz:fastadapter:${kau.Versions.fastAdapter}@aar" + api kau.Dependencies.fastAdapter + api kau.Dependencies.fastAdapterCommons } apply from: '../artifacts.gradle' diff --git a/buildSrc/README.md b/buildSrc/README.md index 14ae3d6..de447ae 100644 --- a/buildSrc/README.md +++ b/buildSrc/README.md @@ -34,17 +34,22 @@ Currently, the plugin is a collection of simple classes. ## Constants -`Versions`, `Plugins`, and `Dependencies` supply constants you can use for your classpath and dependencies +`Versions`, `Plugins`, and `Dependencies` supply constants you can use for your classpath and dependencies. +Some dependencies are also exposed as functions Eg ```gradle dependencies { ... - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${kau.Versions.coroutines}" + // The three dependencies below are all the same thing + implementation "org.jetbrains.kotlin:kotlin-test-junit:${kau.Versions.kotlin}" + implementation kau.Dependencies.kotlinTest + implementation kau.Dependencies.kotlin("test-junit") } ``` + ## Changelog Generator In conjunction with [core](/core#changelog-xml), diff --git a/buildSrc/src/main/kotlin/kau/Dependencies.kt b/buildSrc/src/main/kotlin/kau/Dependencies.kt index 62c938c..df0f1fa 100644 --- a/buildSrc/src/main/kotlin/kau/Dependencies.kt +++ b/buildSrc/src/main/kotlin/kau/Dependencies.kt @@ -4,10 +4,51 @@ package kau * Some common dependencies, backed by the supplied versions */ object Dependencies { - const val kotlin = "org.jetbrains.kotlin:kotlin-stdlib:${Versions.kotlin}" - const val kotlinTest = "org.jetbrains.kotlin:kotlin-test-junit:${Versions.kotlin}" + @JvmStatic + fun kotlin(type: String) = "org.jetbrains.kotlin:kotlin-$type:${Versions.kotlin}" + @JvmField + val kotlin = kotlin("stdlib") + @JvmField + val kotlinTest = kotlin("test-junit") + @JvmField + val kotlinReflect = kotlin("reflect") + const val junit = "junit:junit:${Versions.junit}" - const val espresso = "androidx.test.espresso:espresso-core:${Versions.espresso}" + const val coroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-android:${Versions.coroutines}" + + const val appcompat = "androidx.appcompat:appcompat:${Versions.appcompat}" + const val recyclerView = "androidx.recyclerview:recyclerview:${Versions.recyclerView}" + const val cardView = "androidx.cardview:cardview:${Versions.cardView}" + const val constraintLayout = "androidx.constraintlayout:constraintlayout:${Versions.constraintLayout}" + const val googleMaterial = "com.google.android.material:material:${Versions.googleMaterial}" + + const val iconics = "com.mikepenz:iconics-core:${Versions.iconics}" + const val iconicsGoogle = "com.mikepenz:google-material-typeface:${Versions.iconicsGoogle}.original-kotlin@aar" + const val iconicsMaterial = "com.mikepenz:material-design-iconic-typeface:${Versions.iconicsMaterial}-kotlin@aar" + const val iconicsCommunity = "com.mikepenz:community-material-typeface:${Versions.iconicsCommunity}-kotlin@aar" + + const val aboutLibraries = "com.mikepenz:aboutlibraries:${Versions.aboutLibraries}" + + const val blurry = "jp.wasabeef:blurry:${Versions.blurry}" + + const val glide = "com.github.bumptech.glide:glide:${Versions.glide}" + const val glideKapt = "com.github.bumptech.glide:compiler:${Versions.glide}" + + @JvmStatic + fun materialDialog(type: String) = "com.afollestad.material-dialogs:$type:${Versions.materialDialog}" + @JvmField + val materialDialog = materialDialog("core") + + const val fastAdapter = "com.mikepenz:fastadapter:${Versions.fastAdapter}" + const val fastAdapterCommons = "com.mikepenz:fastadapter-commons:${Versions.fastAdapterCommons}" + + const val bugsnag = "com.bugsnag:bugsnag-android:${Versions.bugsnag}" + + @JvmStatic + fun espresso(type: String) = "androidx.test.espresso:espresso-$type:${Versions.espresso}" + @JvmField + val espresso = espresso("core") + const val testRunner = "androidx.test.ext:junit:${Versions.testRunner}" const val testRules = "androidx.test:rules:${Versions.testRules}" }
\ No newline at end of file diff --git a/buildSrc/src/main/kotlin/kau/Plugins.kt b/buildSrc/src/main/kotlin/kau/Plugins.kt index cdee364..3978d7b 100644 --- a/buildSrc/src/main/kotlin/kau/Plugins.kt +++ b/buildSrc/src/main/kotlin/kau/Plugins.kt @@ -5,6 +5,7 @@ package kau */ object Plugins { const val android = "com.android.tools.build:gradle:${Versions.gradlePlugin}" + const val bugsnag = "com.bugsnag:bugsnag-android-gradle-plugin:${Versions.bugsnagPlugin}" const val kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}" const val androidMaven = "com.github.dcendents:android-maven-gradle-plugin:${Versions.mavenPlugin}" const val playPublisher = "com.github.triplet.gradle:play-publisher:${Versions.playPublishPlugin}" diff --git a/buildSrc/src/main/kotlin/kau/Versions.kt b/buildSrc/src/main/kotlin/kau/Versions.kt index 32db3a5..2405638 100644 --- a/buildSrc/src/main/kotlin/kau/Versions.kt +++ b/buildSrc/src/main/kotlin/kau/Versions.kt @@ -44,8 +44,8 @@ object Versions { // https://github.com/mikepenz/Android-Iconics#1-provide-the-gradle-dependency const val iconics = "3.2.5" - const val iconicsGoogle = "3.0.1.3" - const val iconicsMaterial = "2.2.0.5" + const val iconicsGoogle = "3.0.1.4" + const val iconicsMaterial = "2.2.0.6" const val iconicsCommunity = "3.5.95.1" // https://github.com/afollestad/material-dialogs/releases @@ -65,6 +65,12 @@ object Versions { // https://github.com/diffplug/spotless/blob/master/plugin-gradle/CHANGES.md const val spotless = "3.18.0" + // https://github.com/bugsnag/bugsnag-android/releases + const val bugsnag = "4.12.0" + + // https://github.com/bugsnag/bugsnag-android-gradle-plugin/releases + const val bugsnagPlugin="4.1.1" + // https://mvnrepository.com/artifact/com.android.tools.build/gradle?repo=google const val gradlePlugin = "3.4.1" // https://github.com/dcendents/android-maven-gradle-plugin/releases diff --git a/colorpicker/build.gradle b/colorpicker/build.gradle index 0b58996..ab3ee5d 100644 --- a/colorpicker/build.gradle +++ b/colorpicker/build.gradle @@ -7,7 +7,7 @@ apply from: '../android-lib.gradle' dependencies { implementation project(':core') - implementation "com.afollestad.material-dialogs:color:${kau.Versions.materialDialog}" + implementation kau.Dependencies.materialDialog("color") } apply from: '../artifacts.gradle' diff --git a/core/build.gradle b/core/build.gradle index 43cdc6d..0f9bd5e 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -5,18 +5,18 @@ apply from: '../android-lib.gradle' dependencies { api kau.Dependencies.kotlin - 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 kau.Dependencies.appcompat + api kau.Dependencies.recyclerView + api kau.Dependencies.cardView + api kau.Dependencies.constraintLayout + api kau.Dependencies.googleMaterial - api "org.jetbrains.kotlinx:kotlinx-coroutines-android:${kau.Versions.coroutines}" + api kau.Dependencies.coroutines - api "com.mikepenz:iconics-core:${kau.Versions.iconics}@aar" - api "com.mikepenz:google-material-typeface:${kau.Versions.iconicsGoogle}.original@aar" + api kau.Dependencies.iconics + api kau.Dependencies.iconicsGoogle - api "com.afollestad.material-dialogs:core:${kau.Versions.materialDialog}" + api kau.Dependencies.materialDialog } apply from: '../artifacts.gradle' diff --git a/mediapicker/build.gradle b/mediapicker/build.gradle index 5f4e6a7..b3a4153 100644 --- a/mediapicker/build.gradle +++ b/mediapicker/build.gradle @@ -7,9 +7,8 @@ dependencies { implementation project(':core-ui') implementation project(':adapter') - //noinspection GradleDependency - api "com.github.bumptech.glide:glide:${kau.Versions.glide}" - implementation "jp.wasabeef:blurry:${kau.Versions.blurry}" + api kau.Dependencies.glide + api kau.Dependencies.blurry } apply from: '../artifacts.gradle' diff --git a/sample/build.gradle b/sample/build.gradle index 11be396..aa4bd14 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -127,15 +127,15 @@ dependencies { implementation project(':searchview') implementation project(':mediapicker') - implementation "com.afollestad.material-dialogs:input:${kau.Versions.materialDialog}" + implementation kau.Dependencies.materialDialog("input") testImplementation kau.Dependencies.kotlinTest testImplementation kau.Dependencies.junit 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.espresso("intents") + androidTestImplementation kau.Dependencies.espresso("contrib") androidTestImplementation kau.Dependencies.testRules androidTestImplementation kau.Dependencies.testRunner } |