aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-04-17 14:48:01 -0700
committerAllan Wang <me@allanwang.ca>2021-04-17 14:48:01 -0700
commit6c4d3c203ab87d4d4cc3b86bf4e55c40b18cff96 (patch)
treec971b19d1a644838fed8800434bf2948e5b8f86e
parentdab71ba1f0633ae12d02be6a7bb2c86548b1a590 (diff)
downloadkau-6c4d3c203ab87d4d4cc3b86bf4e55c40b18cff96.tar.gz
kau-6c4d3c203ab87d4d4cc3b86bf4e55c40b18cff96.tar.bz2
kau-6c4d3c203ab87d4d4cc3b86bf4e55c40b18cff96.zip
Update versions and fix hilt
-rw-r--r--buildSrc/src/main/kotlin/kau/Dependencies.kt5
-rw-r--r--buildSrc/src/main/kotlin/kau/Versions.kt46
-rw-r--r--sample/build.gradle4
-rw-r--r--sample/src/androidTest/kotlin/ca/allanwang/kau/sample/KPrefViewTest.kt1
-rw-r--r--sample/src/androidTest/kotlin/ca/allanwang/kau/sample/SampleTestApp.kt4
-rw-r--r--sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt9
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/KPrefSample.kt6
-rw-r--r--sample/src/main/res/xml/kau_changelog.xml2
8 files changed, 43 insertions, 34 deletions
diff --git a/buildSrc/src/main/kotlin/kau/Dependencies.kt b/buildSrc/src/main/kotlin/kau/Dependencies.kt
index 18acccb..83f3d7b 100644
--- a/buildSrc/src/main/kotlin/kau/Dependencies.kt
+++ b/buildSrc/src/main/kotlin/kau/Dependencies.kt
@@ -71,6 +71,9 @@ object Dependencies {
@JvmStatic
fun hilt(type: String) = "com.google.dagger:hilt-android-$type:${Versions.hilt}"
+ @JvmStatic
+ fun compose(type: String) = "androidx.ui:ui-$type:${Versions.compose}"
+
const val junit = "junit:junit:${Versions.junit}"
const val coroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-android:${Versions.coroutines}"
@@ -86,7 +89,7 @@ object Dependencies {
const val iconics = "com.mikepenz:iconics-core:${Versions.iconics}"
const val iconicsGoogle =
- "com.mikepenz:google-material-typeface:${Versions.iconicsGoogle}.original-kotlin@aar"
+ "com.mikepenz:google-material-typeface:${Versions.iconicsGoogle}-kotlin@aar"
const val iconicsMaterial =
"com.mikepenz:material-design-iconic-typeface:${Versions.iconicsMaterial}-kotlin@aar"
const val iconicsCommunity =
diff --git a/buildSrc/src/main/kotlin/kau/Versions.kt b/buildSrc/src/main/kotlin/kau/Versions.kt
index 6f3d77e..56b6eaa 100644
--- a/buildSrc/src/main/kotlin/kau/Versions.kt
+++ b/buildSrc/src/main/kotlin/kau/Versions.kt
@@ -6,13 +6,13 @@ object Versions {
const val targetSdk = 29
// https://mvnrepository.com/artifact/androidx.appcompat/appcompat?repo=google
- const val appcompat = "1.2.0"
+ const val appcompat = "1.3.0-rc01"
// https://mvnrepository.com/artifact/com.google.android.material/material
- const val googleMaterial = "1.2.1"
+ const val googleMaterial = "1.3.0"
// https://mvnrepository.com/artifact/androidx.recyclerview/recyclerview
- const val recyclerView = "1.1.0"
+ const val recyclerView = "1.2.0"
// https://mvnrepository.com/artifact/androidx.swiperefreshlayout/swiperefreshlayout
const val swipeRefreshLayout = "1.1.0"
@@ -21,46 +21,50 @@ object Versions {
const val cardView = "1.0.0"
// https://mvnrepository.com/artifact/androidx.constraintlayout/constraintlayout
- const val constraintLayout = "2.0.1"
+ const val constraintLayout = "2.1.0-beta01"
// https://mvnrepository.com/artifact/androidx.core/core-ktx
- const val coreKtx = "1.3.1"
+ const val coreKtx = "1.5.0-rc01"
// https://kotlinlang.org/docs/reference/using-gradle.html
- const val kotlin = "1.4.21"
+ const val kotlin = "1.4.32"
// https://github.com/Kotlin/kotlinx.coroutines/releases
- const val coroutines = "1.3.9"
+ const val coroutines = "1.4.3"
// https://github.com/mikepenz/AboutLibraries/releases
- const val aboutLibraries = "8.3.1"
+ const val aboutLibraries = "8.8.5"
// https://github.com/wasabeef/Blurry/releases
const val blurry = "3.0.0"
// https://github.com/mikepenz/FastAdapter/releases
- const val fastAdapter = "5.2.3"
+ const val fastAdapter = "5.4.1"
// https://github.com/bumptech/glide/releases
- const val glide = "4.11.0"
+ const val glide = "4.12.0"
// https://github.com/mikepenz/Android-Iconics#1-provide-the-gradle-dependency
- const val iconics = "5.0.3"
- const val iconicsGoogle = "3.0.1.4"
- const val iconicsMaterial = "2.2.0.6"
- const val iconicsCommunity = "5.3.45.1"
+ const val iconics = "5.3.0-b01"
+ const val iconicsGoogle = "4.0.0.1"
+ const val iconicsMaterial = "2.2.0.8"
+ const val iconicsCommunity = "5.8.55.0"
// https://github.com/afollestad/material-dialogs/releases
const val materialDialog = "3.3.0"
// https://github.com/InsertKoinIO/koin/blob/master/CHANGELOG.md
- const val koin = "2.2.2"
+ const val koin = "3.0.1"
+ // https://github.com/google/dagger/releases
// https://mvnrepository.com/artifact/com.google.dagger/hilt-android
- const val hilt = "2.29.1-alpha"
+ const val hilt = "2.34.1-beta"
+
+ // https://mvnrepository.com/artifact/androidx.ui/ui-core?repo=google
+ const val compose = "0.1.0-dev14"
// https://square.github.io/leakcanary/changelog/
- const val leakCanary = "2.4"
+ const val leakCanary = "2.7"
// https://mvnrepository.com/artifact/androidx.test.espresso/espresso-core?repo=google
const val espresso = "3.3.0"
@@ -78,19 +82,19 @@ object Versions {
const val spotless = "5.7.0"
// https://github.com/bugsnag/bugsnag-android/releases
- const val bugsnag = "5.5.0"
+ const val bugsnag = "5.9.0"
// https://github.com/bugsnag/bugsnag-android-gradle-plugin/releases
- const val bugsnagPlugin="5.6.0"
+ const val bugsnagPlugin="5.7.6"
// https://mvnrepository.com/artifact/com.android.tools.build/gradle?repo=google
- const val gradlePlugin = "4.2.0-beta03"
+ const val gradlePlugin = "4.2.0-rc01"
// https://github.com/dcendents/android-maven-gradle-plugin/releases
const val mavenPlugin = "2.1"
// https://github.com/Triple-T/gradle-play-publisher/releases
- const val playPublishPlugin = "3.2.0-agp4.2"
+ const val playPublishPlugin = "3.4.0-agp7.0"
// https://github.com/KeepSafe/dexcount-gradle-plugin/releases
const val dexCountPlugin = "2.0.0"
diff --git a/sample/build.gradle b/sample/build.gradle
index 4779b91..9f2162f 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -149,6 +149,6 @@ dependencies {
androidTestImplementation Dependencies.espresso("contrib")
androidTestImplementation Dependencies.testRules
androidTestImplementation Dependencies.testRunner
- testImplementation Dependencies.hiltTest
- kaptTest Dependencies.hiltCompiler
+ androidTestImplementation Dependencies.hiltTest
+ kaptAndroidTest Dependencies.hiltCompiler
}
diff --git a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/KPrefViewTest.kt b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/KPrefViewTest.kt
index cc45b4e..9f01163 100644
--- a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/KPrefViewTest.kt
+++ b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/KPrefViewTest.kt
@@ -50,7 +50,6 @@ import org.junit.runner.RunWith
*/
@RunWith(AndroidJUnit4::class)
@HiltAndroidTest
-@UninstallModules(PrefFactoryModule::class)
class KPrefViewTest : BaseTest() {
val activity: ActivityTestRule<MainActivity> = ActivityTestRule(MainActivity::class.java)
diff --git a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/SampleTestApp.kt b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/SampleTestApp.kt
index 89e74c7..f6ffdb1 100644
--- a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/SampleTestApp.kt
+++ b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/SampleTestApp.kt
@@ -22,8 +22,8 @@ import androidx.test.runner.AndroidJUnitRunner
import dagger.hilt.EntryPoint
import dagger.hilt.InstallIn
import dagger.hilt.android.EntryPointAccessors
-import dagger.hilt.android.components.ApplicationComponent
import dagger.hilt.android.testing.HiltTestApplication
+import dagger.hilt.components.SingletonComponent
import org.junit.rules.TestRule
import org.junit.runner.Description
import org.junit.runners.model.Statement
@@ -41,7 +41,7 @@ class SampleTestRunner : AndroidJUnitRunner() {
class SampleTestRule : TestRule {
@EntryPoint
- @InstallIn(ApplicationComponent::class)
+ @InstallIn(SingletonComponent::class)
interface SampleTestRuleEntryPoint {
fun pref(): KPrefSample
}
diff --git a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt
index 74da014..1615d2f 100644
--- a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt
+++ b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt
@@ -17,13 +17,16 @@ package ca.allanwang.kau.sample.test
import ca.allanwang.kau.kpref.KPrefFactory
import ca.allanwang.kau.kpref.KPrefFactoryInMemory
+import ca.allanwang.kau.sample.PrefFactoryModule
import dagger.Module
import dagger.Provides
-import dagger.hilt.InstallIn
-import dagger.hilt.android.components.ApplicationComponent
+import dagger.hilt.components.SingletonComponent
+import dagger.hilt.testing.TestInstallIn
@Module
-@InstallIn(ApplicationComponent::class)
+@TestInstallIn(
+ components = [SingletonComponent::class],
+ replaces = [PrefFactoryModule::class])
object PrefFactoryTestModule {
@Provides
fun factory(): KPrefFactory = KPrefFactoryInMemory
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/KPrefSample.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/KPrefSample.kt
index ee39184..970d3eb 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/KPrefSample.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/KPrefSample.kt
@@ -23,8 +23,8 @@ import ca.allanwang.kau.kpref.KPrefFactoryAndroid
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
-import dagger.hilt.android.components.ApplicationComponent
import dagger.hilt.android.qualifiers.ApplicationContext
+import dagger.hilt.components.SingletonComponent
/**
* Created by Allan Wang on 2017-06-07.
@@ -44,14 +44,14 @@ class KPrefSample(factory: KPrefFactory) : KPref("pref_sample", factory = factor
}
@Module
-@InstallIn(ApplicationComponent::class)
+@InstallIn(SingletonComponent::class)
object PrefModule {
@Provides
fun pref(factory: KPrefFactory): KPrefSample = KPrefSample(factory)
}
@Module
-@InstallIn(ApplicationComponent::class)
+@InstallIn(SingletonComponent::class)
object PrefFactoryModule {
@Provides
fun factory(@ApplicationContext context: Context): KPrefFactory = KPrefFactoryAndroid(context)
diff --git a/sample/src/main/res/xml/kau_changelog.xml b/sample/src/main/res/xml/kau_changelog.xml
index 7ee1ea5..fc56b2d 100644
--- a/sample/src/main/res/xml/kau_changelog.xml
+++ b/sample/src/main/res/xml/kau_changelog.xml
@@ -33,7 +33,7 @@
<item text=":core: Remove statusBarLight toggle" />
<item text=":core: Remove kau_status_bar_height; height should be found programmatically" />
<item text=":fastadapter: Migrate fastadapter to v4.x.x" />
- <item text=":fastadapter-viewbinding: Create helper items for ViewBinding" />
+ <item text=":fastadapter-viewbinding: Create helper items for ViewBinding" />g
<item text="Update translations" />
<version title="v5.1.0" />