Centralise the DI code generation logic (#3562)
* Create Anvil extension helper * Use the helper everywhere
This commit is contained in:
parent
3ee686f250
commit
2efdb3ae45
77 changed files with 327 additions and 447 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import extension.setupAnvil
|
||||
|
||||
/*
|
||||
* Copyright 2023, 2024 New Vector Ltd.
|
||||
*
|
||||
|
|
@ -7,7 +9,6 @@
|
|||
|
||||
plugins {
|
||||
id("io.element.android-compose-library")
|
||||
alias(libs.plugins.anvil)
|
||||
id("kotlin-parcelize")
|
||||
}
|
||||
|
||||
|
|
@ -15,13 +16,9 @@ android {
|
|||
namespace = "io.element.android.services.analytics.impl"
|
||||
}
|
||||
|
||||
anvil {
|
||||
generateDaggerFactories.set(true)
|
||||
}
|
||||
setupAnvil()
|
||||
|
||||
dependencies {
|
||||
anvil(projects.anvilcodegen)
|
||||
|
||||
implementation(projects.libraries.androidutils)
|
||||
implementation(projects.libraries.core)
|
||||
implementation(projects.libraries.architecture)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import extension.setupAnvil
|
||||
|
||||
/*
|
||||
* Copyright 2023, 2024 New Vector Ltd.
|
||||
*
|
||||
|
|
@ -6,16 +8,13 @@
|
|||
*/
|
||||
plugins {
|
||||
id("io.element.android-compose-library")
|
||||
alias(libs.plugins.anvil)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "io.element.android.services.analytics.noop"
|
||||
}
|
||||
|
||||
anvil {
|
||||
generateDaggerFactories.set(true)
|
||||
}
|
||||
setupAnvil()
|
||||
|
||||
dependencies {
|
||||
implementation(libs.dagger)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import extension.setupAnvil
|
||||
|
||||
/*
|
||||
* Copyright 2023, 2024 New Vector Ltd.
|
||||
*
|
||||
|
|
@ -6,16 +8,13 @@
|
|||
*/
|
||||
plugins {
|
||||
id("io.element.android-library")
|
||||
alias(libs.plugins.anvil)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "io.element.android.services.analyticsproviders.posthog"
|
||||
}
|
||||
|
||||
anvil {
|
||||
generateDaggerFactories.set(true)
|
||||
}
|
||||
setupAnvil()
|
||||
|
||||
dependencies {
|
||||
implementation(libs.dagger)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import extension.setupAnvil
|
||||
|
||||
/*
|
||||
* Copyright 2023, 2024 New Vector Ltd.
|
||||
*
|
||||
|
|
@ -6,16 +8,13 @@
|
|||
*/
|
||||
plugins {
|
||||
id("io.element.android-library")
|
||||
alias(libs.plugins.anvil)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "io.element.android.services.analyticsproviders.sentry"
|
||||
}
|
||||
|
||||
anvil {
|
||||
generateDaggerFactories.set(true)
|
||||
}
|
||||
setupAnvil()
|
||||
|
||||
dependencies {
|
||||
implementation(libs.dagger)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import extension.setupAnvil
|
||||
|
||||
/*
|
||||
* Copyright 2022-2024 New Vector Ltd.
|
||||
*
|
||||
|
|
@ -7,19 +9,15 @@
|
|||
|
||||
plugins {
|
||||
id("io.element.android-compose-library")
|
||||
alias(libs.plugins.anvil)
|
||||
}
|
||||
|
||||
anvil {
|
||||
generateDaggerFactories.set(true)
|
||||
}
|
||||
setupAnvil()
|
||||
|
||||
android {
|
||||
namespace = "io.element.android.services.apperror.impl"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
anvil(projects.anvilcodegen)
|
||||
implementation(libs.dagger)
|
||||
implementation(projects.libraries.core)
|
||||
implementation(projects.libraries.di)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import extension.setupAnvil
|
||||
|
||||
/*
|
||||
* Copyright 2022-2024 New Vector Ltd.
|
||||
*
|
||||
|
|
@ -7,24 +9,19 @@
|
|||
|
||||
plugins {
|
||||
id("io.element.android-library")
|
||||
alias(libs.plugins.anvil)
|
||||
}
|
||||
|
||||
anvil {
|
||||
generateDaggerFactories.set(true)
|
||||
}
|
||||
setupAnvil()
|
||||
|
||||
android {
|
||||
namespace = "io.element.android.services.appnavstate.impl"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
anvil(projects.anvilcodegen)
|
||||
implementation(libs.dagger)
|
||||
implementation(projects.libraries.core)
|
||||
implementation(projects.libraries.di)
|
||||
implementation(projects.libraries.matrix.api)
|
||||
implementation(projects.anvilannotations)
|
||||
|
||||
implementation(libs.coroutines.core)
|
||||
implementation(libs.androidx.corektx)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import extension.setupAnvil
|
||||
|
||||
/*
|
||||
* Copyright 2023, 2024 New Vector Ltd.
|
||||
*
|
||||
|
|
@ -6,16 +8,13 @@
|
|||
*/
|
||||
plugins {
|
||||
id("io.element.android-library")
|
||||
alias(libs.plugins.anvil)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "io.element.android.services.toolbox.impl"
|
||||
}
|
||||
|
||||
anvil {
|
||||
generateDaggerFactories.set(true)
|
||||
}
|
||||
setupAnvil()
|
||||
|
||||
dependencies {
|
||||
implementation(libs.dagger)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue