diff options
Diffstat (limited to 'buildSrc')
-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 |
4 files changed, 60 insertions, 7 deletions
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 |