diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index 3b83451dd..e776c40da 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -4,15 +4,6 @@
-
diff --git a/build.gradle b/build.gradle
index 41cb6e1a1..53e46b62a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -9,6 +9,7 @@ buildscript {
classpath "com.android.tools.build:gradle:${Versions.gradlePlugin}"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:${Versions.kotlin}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
+ classpath "com.google.dagger:hilt-android-gradle-plugin:${Versions.hilt}"
// Upload with:
// ./gradlew clean assemble uploadArchives --no-daemon --no-parallel
diff --git a/buildSrc/src/main/java/dependencies.kt b/buildSrc/src/main/java/dependencies.kt
index 79d39abb0..a506a4925 100644
--- a/buildSrc/src/main/java/dependencies.kt
+++ b/buildSrc/src/main/java/dependencies.kt
@@ -22,9 +22,10 @@ object Versions {
// Libraries
const val autoValue = "1.6.6"
- const val dagger = "2.27"
+ const val dagger = "2.31.1"
const val daggerAssisted = "0.5.2"
const val epoxy = "4.0.0"
+ const val hilt = "2.31.1-alpha"
const val koin = "2.0.1"
const val kotlinCoroutines = "1.4.1"
const val lottie = "3.4.0"
@@ -54,6 +55,7 @@ object AnnotationProcessors {
const val dagger = "com.google.dagger:dagger-compiler:${Versions.dagger}"
const val daggerAssisted = "com.squareup.inject:assisted-inject-processor-dagger2:${Versions.daggerAssisted}"
const val epoxy = "com.airbnb.android:epoxy-processor:${Versions.epoxy}"
+ const val hilt = "com.google.dagger:hilt-android-compiler:${Versions.hilt}"
const val lifecycle = "androidx.lifecycle:lifecycle-compiler:${Versions.lifecycle}"
const val moshi = "com.squareup.moshi:moshi-kotlin-codegen:${Versions.moshi}"
const val room = "androidx.room:room-compiler:${Versions.room}"
@@ -73,6 +75,7 @@ object Libraries {
const val fragment = "androidx.fragment:fragment:${Versions.fragment}"
const val fragmentKtx = "androidx.fragment:fragment-ktx:${Versions.fragment}"
const val fragmentTesting = "androidx.fragment:fragment-testing:${Versions.fragment}"
+ const val hilt = "com.google.dagger:hilt-android:${Versions.hilt}"
const val junit = "junit:junit:${Versions.junit}"
const val koin = "org.koin:koin-android:${Versions.koin}"
const val kotlin = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${Versions.kotlin}"
diff --git a/dogs/build.gradle b/dogs/build.gradle
index 373912146..c81214718 100644
--- a/dogs/build.gradle
+++ b/dogs/build.gradle
@@ -11,8 +11,8 @@ android {
versionName "1.0"
}
- dataBinding {
- enabled = true
+ buildFeatures {
+ dataBinding true
}
}
diff --git a/hellodagger/build.gradle b/hellodagger/build.gradle
index 4cdedee7d..22d715e59 100644
--- a/hellodagger/build.gradle
+++ b/hellodagger/build.gradle
@@ -44,8 +44,6 @@ dependencies {
implementation Libraries.rxJava
implementation Libraries.viewModelKtx
implementation Libraries.multidex
-
- implementation fileTree(dir: "libs", include: ["*.jar"])
implementation project(":mvrx")
debugImplementation Libraries.fragmentTesting
diff --git a/hellohilt/.gitignore b/hellohilt/.gitignore
new file mode 100644
index 000000000..796b96d1c
--- /dev/null
+++ b/hellohilt/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/hellohilt/README.md b/hellohilt/README.md
new file mode 100644
index 000000000..b4f97e77a
--- /dev/null
+++ b/hellohilt/README.md
@@ -0,0 +1,67 @@
+# Dagger Usage Sample for MvRx
+
+This module contains a sample app demonstrating how to setup Hilt and AssistedInject in an app using MvRx.
+
+// build.gradle
+dependencies {
+ def hiltVersion = "2.31.0" // or newer.
+ kapt "com.google.dagger:hilt-android-compiler:${hiltVersion}"
+ implementation "com.google.dagger:hilt-android:${hiltVersion}"
+}
+```
+
+## Key Features
+
+* **Injecting state into ViewModels with AssistedInject**
+
+ Since the `initialState` parameter is only available at runtime, we use the [AssistedInject](https://dagger.dev/dev-guide/assisted-injection).
+
+* **Multibinding setup for AssistedInject Factories**
+
+ Every ViewModel using AssistedInject needs a Factory interface annotated with `@AssistedFactory`. These factories are grouped together under a common parent type [AssistedViewModelFactory](src/main/java/com/airbnb/mvrx/hellohilt/di/AssistedViewModelFactory.kt) to enable a Multibinding Dagger setup.
+
+## Example
+
+* Create your ViewModel with an `@AssistedInject` constructor, an `@AssistedFactory` implementing `AssistedViewModelFactory`, and a companion object implementing `MavericksViewModelFactory`.
+
+```kotlin
+// NOTE: unlike using Jetpack ViewModels with Hilt, you do not need to annotate your ViewModel class with @HiltViewModel.
+class MyViewModel @AssistedInject constructor(
+ @Assisted initialState: MyState,
+ // and other dependencies
+) {
+
+ @AssistedFactory
+ interface Factory: AssistedViewModelFactory {
+ override fun create(initialState: MyState): MyViewModel
+ }
+
+ companion object : MavericksViewModelFactory by hiltMavericksViewModelFactory()
+}
+```
+
+* Tell Hilt to include your ViewModel's AssistedInject Factory in a Multibinding map.
+
+```kotlin
+@Module
+@InstallIn(MavericksViewModelComponent::class)
+interface ViewModelsModule {
+ @Binds
+ @IntoMap
+ @ViewModelKey(HelloHiltViewModel::class)
+ fun helloViewModelFactory(factory: HelloHiltViewModel.Factory): AssistedViewModelFactory<*, *>
+}
+
+```
+
+* With this setup complete, request your ViewModel in a Fragment as usual, using any of MvRx's ViewModel delegates.
+
+```kotlin
+class MyFragment : Fragment(), MavericksView {
+ val viewModel: MyViewModel by fragmentViewModel()
+}
+```
+
+## How it works
+
+`HiltMavericksViewModelFactory` will create a custom ViewModelComponent that is a child of ActivityComponent and will create an instance of your ViewModel with it.
diff --git a/hellohilt/build.gradle b/hellohilt/build.gradle
new file mode 100644
index 000000000..94fa12cea
--- /dev/null
+++ b/hellohilt/build.gradle
@@ -0,0 +1,33 @@
+apply plugin: "com.android.application"
+apply plugin: "kotlin-android"
+apply plugin: "kotlin-kapt"
+apply plugin: 'dagger.hilt.android.plugin'
+
+android {
+ defaultConfig {
+ applicationId "com.airbnb.mvrx.helloHilt"
+ versionCode 1
+ versionName "0.0.1"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled true
+ signingConfig signingConfigs.debug
+ }
+ }
+
+ buildFeatures {
+ viewBinding true
+ }
+}
+
+dependencies {
+ implementation Libraries.appcompat
+ implementation Libraries.constraintlayout
+ implementation Libraries.fragmentKtx
+ kapt AnnotationProcessors.hilt
+ implementation Libraries.hilt
+ implementation project(":mvrx-rxjava2")
+}
diff --git a/hellohilt/src/main/AndroidManifest.xml b/hellohilt/src/main/AndroidManifest.xml
new file mode 100644
index 000000000..7d035c684
--- /dev/null
+++ b/hellohilt/src/main/AndroidManifest.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/HelloHiltApplication.kt b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/HelloHiltApplication.kt
new file mode 100644
index 000000000..c6da1f59c
--- /dev/null
+++ b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/HelloHiltApplication.kt
@@ -0,0 +1,13 @@
+package com.airbnb.mvrx.hellohilt
+
+import android.app.Application
+import com.airbnb.mvrx.Mavericks
+import dagger.hilt.android.HiltAndroidApp
+
+@HiltAndroidApp
+class HelloHiltApplication : Application() {
+ override fun onCreate() {
+ super.onCreate()
+ Mavericks.initialize(this)
+ }
+}
diff --git a/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/HelloHiltFragment.kt b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/HelloHiltFragment.kt
new file mode 100644
index 000000000..c692ce9ae
--- /dev/null
+++ b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/HelloHiltFragment.kt
@@ -0,0 +1,38 @@
+package com.airbnb.mvrx.hellohilt
+
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.fragment.app.Fragment
+import com.airbnb.mvrx.MvRxView
+import com.airbnb.mvrx.fragmentViewModel
+import com.airbnb.mvrx.hellohilt.databinding.HelloHiltFragmentBinding
+import com.airbnb.mvrx.withState
+import dagger.hilt.android.AndroidEntryPoint
+
+@AndroidEntryPoint
+class HelloHiltFragment : Fragment(R.layout.hello_hilt_fragment), MvRxView {
+ val viewModel1: HelloHiltViewModel by fragmentViewModel(keyFactory = { "a" })
+ val viewModel2: HelloHiltViewModel by fragmentViewModel(keyFactory = { "b" })
+
+ private var _binding: HelloHiltFragmentBinding? = null
+ private val binding get() = _binding ?: error("Binding was null!")
+
+ override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
+ _binding = HelloHiltFragmentBinding.inflate(inflater, container, false)
+ return binding.root
+ }
+
+ override fun onDestroyView() {
+ _binding = null
+ super.onDestroyView()
+ }
+
+ override fun invalidate() = withState(viewModel1, viewModel2) { state1, state2 ->
+ @Suppress("Detekt.MaxLineLength")
+ binding.with.text = "@MavericksViewModelScoped: VM1: [${state1.viewModelScopedClassId1},${state1.viewModelScopedClassId2}] VM2: [${state2.viewModelScopedClassId1},${state2.viewModelScopedClassId2}]"
+ @Suppress("Detekt.MaxLineLength")
+ binding.without.text = "VM1: [${state1.notViewModelScopedClassId1},${state1.notViewModelScopedClassId2}] VM2: [${state2.notViewModelScopedClassId1},${state2.notViewModelScopedClassId2}]"
+ }
+}
diff --git a/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/HelloHiltViewModel.kt b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/HelloHiltViewModel.kt
new file mode 100644
index 000000000..7e600a109
--- /dev/null
+++ b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/HelloHiltViewModel.kt
@@ -0,0 +1,42 @@
+package com.airbnb.mvrx.hellohilt
+
+import com.airbnb.mvrx.BaseMvRxViewModel
+import com.airbnb.mvrx.MavericksViewModelFactory
+import com.airbnb.mvrx.MvRxState
+import com.airbnb.mvrx.hellohilt.di.AssistedViewModelFactory
+import com.airbnb.mvrx.hellohilt.di.hiltMavericksViewModelFactory
+import dagger.assisted.Assisted
+import dagger.assisted.AssistedFactory
+import dagger.assisted.AssistedInject
+
+data class HelloHiltState(
+ val viewModelScopedClassId1: Int? = null,
+ val viewModelScopedClassId2: Int? = null,
+ val notViewModelScopedClassId1: Int? = null,
+ val notViewModelScopedClassId2: Int? = null,
+) : MvRxState
+
+class HelloHiltViewModel @AssistedInject constructor(
+ @Assisted state: HelloHiltState,
+ private val repo1: HelloRepository,
+ private val repo2: HelloRepository,
+) : BaseMvRxViewModel(state) {
+
+ init {
+ setState {
+ copy(
+ viewModelScopedClassId1 = repo1.viewModelScopedClass.id,
+ viewModelScopedClassId2 = repo2.viewModelScopedClass.id,
+ notViewModelScopedClassId1 = repo1.notViewModelScopedClass.id,
+ notViewModelScopedClassId2 = repo2.notViewModelScopedClass.id,
+ )
+ }
+ }
+
+ @AssistedFactory
+ interface Factory : AssistedViewModelFactory {
+ override fun create(state: HelloHiltState): HelloHiltViewModel
+ }
+
+ companion object : MavericksViewModelFactory by hiltMavericksViewModelFactory()
+}
diff --git a/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/HelloRepository.kt b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/HelloRepository.kt
new file mode 100644
index 000000000..2ff06f4bb
--- /dev/null
+++ b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/HelloRepository.kt
@@ -0,0 +1,8 @@
+package com.airbnb.mvrx.hellohilt
+
+import javax.inject.Inject
+
+class HelloRepository @Inject constructor(
+ val viewModelScopedClass: ViewModelScopedClass,
+ val notViewModelScopedClass: NotViewModelScopedClass,
+)
diff --git a/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/MainActivity.kt b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/MainActivity.kt
new file mode 100644
index 000000000..60d76a3e3
--- /dev/null
+++ b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/MainActivity.kt
@@ -0,0 +1,7 @@
+package com.airbnb.mvrx.hellohilt
+
+import androidx.appcompat.app.AppCompatActivity
+import dagger.hilt.android.AndroidEntryPoint
+
+@AndroidEntryPoint
+class MainActivity : AppCompatActivity(R.layout.activity_main)
diff --git a/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/NotViewModelScopedClass.kt b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/NotViewModelScopedClass.kt
new file mode 100644
index 000000000..56d106bdd
--- /dev/null
+++ b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/NotViewModelScopedClass.kt
@@ -0,0 +1,12 @@
+package com.airbnb.mvrx.hellohilt
+
+import java.util.concurrent.atomic.AtomicInteger
+import javax.inject.Inject
+
+class NotViewModelScopedClass @Inject constructor() {
+ val id = instanceId.incrementAndGet()
+
+ companion object {
+ private val instanceId = AtomicInteger(0)
+ }
+}
diff --git a/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/ViewModelScopedClass.kt b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/ViewModelScopedClass.kt
new file mode 100644
index 000000000..2bd8c14b7
--- /dev/null
+++ b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/ViewModelScopedClass.kt
@@ -0,0 +1,14 @@
+package com.airbnb.mvrx.hellohilt
+
+import com.airbnb.mvrx.hellohilt.di.MavericksViewModelScoped
+import java.util.concurrent.atomic.AtomicInteger
+import javax.inject.Inject
+
+@MavericksViewModelScoped
+class ViewModelScopedClass @Inject constructor() {
+ val id = instanceId.incrementAndGet()
+
+ companion object {
+ private val instanceId = AtomicInteger(0)
+ }
+}
diff --git a/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/ViewModelsModule.kt b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/ViewModelsModule.kt
new file mode 100644
index 000000000..f08597898
--- /dev/null
+++ b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/ViewModelsModule.kt
@@ -0,0 +1,18 @@
+package com.airbnb.mvrx.hellohilt
+
+import com.airbnb.mvrx.hellohilt.di.AssistedViewModelFactory
+import com.airbnb.mvrx.hellohilt.di.MavericksViewModelComponent
+import com.airbnb.mvrx.hellohilt.di.ViewModelKey
+import dagger.Binds
+import dagger.Module
+import dagger.hilt.InstallIn
+import dagger.multibindings.IntoMap
+
+@Module
+@InstallIn(MavericksViewModelComponent::class)
+interface ViewModelsModule {
+ @Binds
+ @IntoMap
+ @ViewModelKey(HelloHiltViewModel::class)
+ fun helloViewModelFactory(factory: HelloHiltViewModel.Factory): AssistedViewModelFactory<*, *>
+}
diff --git a/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/di/AssistedViewModelFactory.kt b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/di/AssistedViewModelFactory.kt
new file mode 100644
index 000000000..95d17a482
--- /dev/null
+++ b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/di/AssistedViewModelFactory.kt
@@ -0,0 +1,24 @@
+package com.airbnb.mvrx.hellohilt.di
+
+import com.airbnb.mvrx.MavericksState
+import com.airbnb.mvrx.MavericksViewModel
+
+/**
+ * This factory allows Mavericks to supply the initial or restored [MavericksState] to Hilt.
+ *
+ * Add this interface inside of your [MavericksViewModel] class then create the following Hilt module:
+ *
+ * @Module
+ * @InstallIn(MavericksViewModelComponent::class)
+ * interface ViewModelsModule {
+ * @Binds
+ * @IntoMap
+ * @ViewModelKey(MyViewModel::class)
+ * fun myViewModelFactory(factory: MyViewModel.Factory): AssistedViewModelFactory<*, *>
+ * }
+ *
+ * If you already have a ViewModelsModule then all you have to do is add the multibinding entry for your new [MavericksViewModel].
+ */
+interface AssistedViewModelFactory, S : MavericksState> {
+ fun create(state: S): VM
+}
diff --git a/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/di/HiltMavericksViewModelFactory.kt b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/di/HiltMavericksViewModelFactory.kt
new file mode 100644
index 000000000..6bb89c3e5
--- /dev/null
+++ b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/di/HiltMavericksViewModelFactory.kt
@@ -0,0 +1,72 @@
+package com.airbnb.mvrx.hellohilt.di
+
+import com.airbnb.mvrx.MavericksState
+import com.airbnb.mvrx.MavericksViewModel
+import com.airbnb.mvrx.MavericksViewModelFactory
+import com.airbnb.mvrx.ViewModelContext
+import dagger.hilt.DefineComponent
+import dagger.hilt.EntryPoint
+import dagger.hilt.EntryPoints
+import dagger.hilt.InstallIn
+import dagger.hilt.components.SingletonComponent
+
+/**
+ * To connect Mavericks ViewModel creation with Hilt's dependency injection, add the following Factory and companion object to your MavericksViewModel.
+ *
+ * Example:
+ *
+ * class MyViewModel @AssistedInject constructor(...): MavericksViewModel(...) {
+ *
+ * @AssistedInject.Factory
+ * interface Factory : AssistedViewModelFactory {
+ * ...
+ * }
+ *
+ * companion object : MavericksViewModelFactory by hiltMavericksViewModelFactory()
+ * }
+ */
+
+inline fun , S : MavericksState> hiltMavericksViewModelFactory() = HiltMavericksViewModelFactory(VM::class.java)
+
+class HiltMavericksViewModelFactory, S : MavericksState>(
+ private val viewModelClass: Class>
+) : MavericksViewModelFactory {
+
+ override fun create(viewModelContext: ViewModelContext, state: S): VM {
+ // We want to create the ViewModelComponent. In order to do that, we need to get its parent: ActivityComponent.
+ val componentBuilder = EntryPoints.get(viewModelContext.app(), CreateMavericksViewModelComponent::class.java).mavericksViewModelComponentBuilder()
+ val viewModelComponent = componentBuilder.build()
+ val viewModelFactoryMap = EntryPoints.get(viewModelComponent, HiltMavericksEntryPoint::class.java).viewModelFactories
+ val viewModelFactory = viewModelFactoryMap[viewModelClass]
+
+ @Suppress("UNCHECKED_CAST")
+ val castedViewModelFactory = viewModelFactory as? AssistedViewModelFactory
+ return castedViewModelFactory?.create(state) as VM
+ }
+}
+
+/**
+ * Hilt's ViewModelComponent's parent is ActivityRetainedComponent but there is no easy way to access it. SingletonComponent should be sufficient
+ * because the ViewModel that gets created is the only object with a reference to the created component so the lifecycle of it will
+ * still be correct.
+ */
+@MavericksViewModelScoped
+@DefineComponent(parent = SingletonComponent::class)
+interface MavericksViewModelComponent
+
+@DefineComponent.Builder
+interface MavericksViewModelComponentBuilder {
+ fun build(): MavericksViewModelComponent
+}
+
+@EntryPoint
+@InstallIn(SingletonComponent::class)
+interface CreateMavericksViewModelComponent {
+ fun mavericksViewModelComponentBuilder(): MavericksViewModelComponentBuilder
+}
+
+@EntryPoint
+@InstallIn(MavericksViewModelComponent::class)
+interface HiltMavericksEntryPoint {
+ val viewModelFactories: Map>, AssistedViewModelFactory<*, *>>
+}
diff --git a/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/di/MavericksViewModelScoped.kt b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/di/MavericksViewModelScoped.kt
new file mode 100644
index 000000000..f53978c8c
--- /dev/null
+++ b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/di/MavericksViewModelScoped.kt
@@ -0,0 +1,9 @@
+package com.airbnb.mvrx.hellohilt.di
+
+import javax.inject.Scope
+
+/**
+ * Scope annotation for bindings that should exist for the life of an MavericksViewModel.
+ */
+@Scope
+annotation class MavericksViewModelScoped
diff --git a/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/di/ViewModelKey.kt b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/di/ViewModelKey.kt
new file mode 100644
index 000000000..167b83c82
--- /dev/null
+++ b/hellohilt/src/main/java/com/airbnb/mvrx/hellohilt/di/ViewModelKey.kt
@@ -0,0 +1,13 @@
+package com.airbnb.mvrx.hellohilt.di
+
+import com.airbnb.mvrx.MavericksViewModel
+import dagger.MapKey
+import kotlin.reflect.KClass
+
+/**
+ * A [MapKey] for populating a map of ViewModels and their factories.
+ */
+@Retention(AnnotationRetention.RUNTIME)
+@Target(AnnotationTarget.FUNCTION)
+@MapKey
+annotation class ViewModelKey(val value: KClass>)
diff --git a/hellohilt/src/main/res/drawable-v24/ic_launcher_foreground.xml b/hellohilt/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 000000000..1f6bb2906
--- /dev/null
+++ b/hellohilt/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hellohilt/src/main/res/drawable/ic_launcher_background.xml b/hellohilt/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 000000000..0d025f9bf
--- /dev/null
+++ b/hellohilt/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hellohilt/src/main/res/layout/activity_main.xml b/hellohilt/src/main/res/layout/activity_main.xml
new file mode 100644
index 000000000..40effbd2c
--- /dev/null
+++ b/hellohilt/src/main/res/layout/activity_main.xml
@@ -0,0 +1,6 @@
+
+
diff --git a/hellohilt/src/main/res/layout/hello_hilt_fragment.xml b/hellohilt/src/main/res/layout/hello_hilt_fragment.xml
new file mode 100644
index 000000000..83b5cf864
--- /dev/null
+++ b/hellohilt/src/main/res/layout/hello_hilt_fragment.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
diff --git a/hellohilt/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/hellohilt/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 000000000..eca70cfe5
--- /dev/null
+++ b/hellohilt/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/hellohilt/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/hellohilt/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 000000000..eca70cfe5
--- /dev/null
+++ b/hellohilt/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/hellohilt/src/main/res/mipmap-hdpi/ic_launcher.png b/hellohilt/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 000000000..898f3ed59
Binary files /dev/null and b/hellohilt/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/hellohilt/src/main/res/mipmap-hdpi/ic_launcher_round.png b/hellohilt/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 000000000..dffca3601
Binary files /dev/null and b/hellohilt/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/hellohilt/src/main/res/mipmap-mdpi/ic_launcher.png b/hellohilt/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 000000000..64ba76f75
Binary files /dev/null and b/hellohilt/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/hellohilt/src/main/res/mipmap-mdpi/ic_launcher_round.png b/hellohilt/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 000000000..dae5e0823
Binary files /dev/null and b/hellohilt/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/hellohilt/src/main/res/mipmap-xhdpi/ic_launcher.png b/hellohilt/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 000000000..e5ed46597
Binary files /dev/null and b/hellohilt/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/hellohilt/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/hellohilt/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 000000000..14ed0af35
Binary files /dev/null and b/hellohilt/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/hellohilt/src/main/res/mipmap-xxhdpi/ic_launcher.png b/hellohilt/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 000000000..b0907cac3
Binary files /dev/null and b/hellohilt/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/hellohilt/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/hellohilt/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 000000000..d8ae03154
Binary files /dev/null and b/hellohilt/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/hellohilt/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/hellohilt/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 000000000..2c18de9e6
Binary files /dev/null and b/hellohilt/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/hellohilt/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/hellohilt/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 000000000..beed3cdd2
Binary files /dev/null and b/hellohilt/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/hellohilt/src/main/res/values/colors.xml b/hellohilt/src/main/res/values/colors.xml
new file mode 100644
index 000000000..69b22338c
--- /dev/null
+++ b/hellohilt/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #008577
+ #00574B
+ #D81B60
+
diff --git a/hellohilt/src/main/res/values/strings.xml b/hellohilt/src/main/res/values/strings.xml
new file mode 100644
index 000000000..d959781ef
--- /dev/null
+++ b/hellohilt/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ Hello Hilt
+
diff --git a/hellohilt/src/main/res/values/styles.xml b/hellohilt/src/main/res/values/styles.xml
new file mode 100644
index 000000000..5885930df
--- /dev/null
+++ b/hellohilt/src/main/res/values/styles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/mvrx-navigation/src/main/kotlin/com/airbnb/mvrx/navigation/navigationLifecycleAwareLazy.kt b/mvrx-navigation/src/main/kotlin/com/airbnb/mvrx/navigation/navigationLifecycleAwareLazy.kt
index d72de4ac0..79c227198 100644
--- a/mvrx-navigation/src/main/kotlin/com/airbnb/mvrx/navigation/navigationLifecycleAwareLazy.kt
+++ b/mvrx-navigation/src/main/kotlin/com/airbnb/mvrx/navigation/navigationLifecycleAwareLazy.kt
@@ -57,6 +57,7 @@ class navigationLifecycleAwareLazy(
@Suppress("UNCHECKED_CAST") (_v2 as T)
} else {
val typedValue =
+ @Suppress("Detekt.TooGenericExceptionCaught")
try {
initializer!!()
} catch (@SuppressWarnings("Detekt.TooGenericExceptionCaught") cause: Throwable) {
diff --git a/settings.gradle b/settings.gradle
index 34b1152f6..6e43edcc5 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -10,6 +10,7 @@ include ":testing"
include ":counter"
include ":dogs"
include ":hellodagger"
+include ":hellohilt"
include ":sample"
include ":sample-navigation"
include ":todomvrx"