From 5f5389b0fde9d12c56e337dff169fa6319b449cf Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 11 Jan 2021 00:19:31 -0800 Subject: Remove kotlin synethetics --- sample/build.gradle | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sample/build.gradle') diff --git a/sample/build.gradle b/sample/build.gradle index a39ee2d..4779b91 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -3,7 +3,7 @@ import kau.Dependencies apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' -apply plugin: 'kotlin-android-extensions' +apply plugin: 'kotlin-parcelize' //apply plugin: 'com.bugsnag.android.gradle' apply plugin: 'com.github.triplet.play' apply plugin: 'dagger.hilt.android.plugin' @@ -31,8 +31,8 @@ android { multiDexEnabled true testInstrumentationRunner "ca.allanwang.kau.sample.SampleTestRunner" } - buildFeatures { - viewBinding = true + viewBinding { + enabled true } def releaseSigning = file("../files/kau.properties") @@ -86,6 +86,7 @@ android { pickFirst 'META-INF/core_release.kotlin_module' pickFirst 'META-INF/library_release.kotlin_module' pickFirst 'META-INF/library-core_release.kotlin_module' + exclude "**/module-info.class" } compileOptions { -- cgit v1.2.3 From 6c4d3c203ab87d4d4cc3b86bf4e55c40b18cff96 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 17 Apr 2021 14:48:01 -0700 Subject: Update versions and fix hilt --- buildSrc/src/main/kotlin/kau/Dependencies.kt | 5 ++- buildSrc/src/main/kotlin/kau/Versions.kt | 46 ++++++++++++---------- sample/build.gradle | 4 +- .../ca/allanwang/kau/sample/KPrefViewTest.kt | 1 - .../ca/allanwang/kau/sample/SampleTestApp.kt | 4 +- .../ca/allanwang/kau/sample/test/TestModules.kt | 9 +++-- .../kotlin/ca/allanwang/kau/sample/KPrefSample.kt | 6 +-- sample/src/main/res/xml/kau_changelog.xml | 2 +- 8 files changed, 43 insertions(+), 34 deletions(-) (limited to 'sample/build.gradle') 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 = 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 @@ - + g -- cgit v1.2.3