Start migrating Anvil KSP to Metro
This commit is contained in:
parent
2eacce47c0
commit
92a4b8b66b
703 changed files with 3523 additions and 2820 deletions
|
|
@ -12,4 +12,5 @@ plugins {
|
|||
|
||||
dependencies {
|
||||
api(libs.inject)
|
||||
api(libs.metro.runtime)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright 2022-2024 New Vector Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.libraries.di
|
||||
|
||||
import dev.zacsweers.metro.Qualifier
|
||||
|
||||
/**
|
||||
* Qualifies a [File] object which represents the application base directory.
|
||||
*/
|
||||
//@Retention(AnnotationRetention.RUNTIME)
|
||||
@MustBeDocumented
|
||||
@Qualifier
|
||||
@Target(
|
||||
AnnotationTarget.CLASS,
|
||||
AnnotationTarget.FIELD,
|
||||
AnnotationTarget.FUNCTION,
|
||||
AnnotationTarget.PROPERTY,
|
||||
AnnotationTarget.PROPERTY_GETTER,
|
||||
AnnotationTarget.VALUE_PARAMETER,
|
||||
AnnotationTarget.TYPE,
|
||||
)
|
||||
public annotation class BaseDirectory
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
package io.element.android.libraries.di
|
||||
|
||||
import javax.inject.Qualifier
|
||||
import dev.zacsweers.metro.Qualifier
|
||||
|
||||
/**
|
||||
* Qualifies a [File] object which represents the application cache directory.
|
||||
|
|
@ -15,4 +15,13 @@ import javax.inject.Qualifier
|
|||
@Retention(AnnotationRetention.RUNTIME)
|
||||
@MustBeDocumented
|
||||
@Qualifier
|
||||
annotation class CacheDirectory
|
||||
@Target(
|
||||
AnnotationTarget.CLASS,
|
||||
AnnotationTarget.FIELD,
|
||||
AnnotationTarget.FUNCTION,
|
||||
AnnotationTarget.PROPERTY,
|
||||
AnnotationTarget.PROPERTY_GETTER,
|
||||
AnnotationTarget.VALUE_PARAMETER,
|
||||
AnnotationTarget.TYPE,
|
||||
)
|
||||
public annotation class CacheDirectory
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
/*
|
||||
* Copyright 2022-2024 New Vector Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.libraries.di
|
||||
|
||||
import javax.inject.Scope
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
@Scope
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class SingleIn(val clazz: KClass<*>)
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
package io.element.android.libraries.di.annotations
|
||||
|
||||
import javax.inject.Qualifier
|
||||
import dev.zacsweers.metro.Qualifier
|
||||
|
||||
/**
|
||||
* Qualifies a [CoroutineScope] object which represents the base coroutine scope to use for the application.
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
/*
|
||||
* Copyright 2022-2024 New Vector Ltd.
|
||||
* Copyright 2025 New Vector Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.libraries.di
|
||||
package io.element.android.libraries.di.annotations
|
||||
|
||||
import javax.inject.Qualifier
|
||||
import dev.zacsweers.metro.Qualifier
|
||||
|
||||
/**
|
||||
* Qualifies a [Context] object that represents the application context.
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
package io.element.android.libraries.di.annotations
|
||||
|
||||
import javax.inject.Qualifier
|
||||
import dev.zacsweers.metro.Qualifier
|
||||
|
||||
/**
|
||||
* Qualifies a [CoroutineScope] object which represents the base coroutine scope to use for an active session.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue