From 9d8ad73e635663c95e374e2ccd576ddf9f48e09f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 27 Feb 2021 22:49:50 +0100 Subject: [PATCH] Bump hilt_version from 2.32-alpha to 2.33-beta (#1163) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump hilt_version from 2.32-alpha to 2.33-beta Bumps `hilt_version` from 2.32-alpha to 2.33-beta. Updates `hilt-android-gradle-plugin` from 2.32-alpha to 2.33-beta - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/commits) Updates `hilt-android` from 2.32-alpha to 2.33-beta - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/commits) Updates `hilt-android-compiler` from 2.32-alpha to 2.33-beta - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/commits) Signed-off-by: dependabot-preview[bot] * Add inject before super.onCreate() in activity * Fix format Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: RafaƂ Borcz --- .../java/io/github/wulkanowy/ui/base/BaseActivity.kt | 10 +++++++++- build.gradle | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/github/wulkanowy/ui/base/BaseActivity.kt b/app/src/main/java/io/github/wulkanowy/ui/base/BaseActivity.kt index 86b6701b..9b93953d 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/base/BaseActivity.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/base/BaseActivity.kt @@ -37,6 +37,7 @@ abstract class BaseActivity, VB : ViewBinding> : abstract var presenter: T override fun onCreate(savedInstanceState: Bundle?) { + inject() themeManager.applyActivityTheme(this) super.onCreate(savedInstanceState) supportFragmentManager.registerFragmentLifecycleCallbacks(fragmentLifecycleLogger, true) @@ -44,7 +45,9 @@ abstract class BaseActivity, VB : ViewBinding> : if (SDK_INT >= LOLLIPOP) { @Suppress("DEPRECATION") - setTaskDescription(ActivityManager.TaskDescription(null, null, getThemeAttrColor(R.attr.colorSurface))) + setTaskDescription( + ActivityManager.TaskDescription(null, null, getThemeAttrColor(R.attr.colorSurface)) + ) } } @@ -84,4 +87,9 @@ abstract class BaseActivity, VB : ViewBinding> : invalidateOptionsMenu() presenter.onDetachView() } + + //https://github.com/google/dagger/releases/tag/dagger-2.33 + protected open fun inject() { + throw UnsupportedOperationException() + } } diff --git a/build.gradle b/build.gradle index eafcec46..3f49f1e9 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ buildscript { ext { kotlin_version = '1.4.31' about_libraries = '8.8.3' - hilt_version = "2.32-alpha" + hilt_version = "2.33-beta" } repositories { mavenCentral()