mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Start migrating Anvil KSP to Metro
This commit is contained in:
@@ -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<*>)
|
||||
+1
-1
@@ -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.
|
||||
|
||||
+3
-3
@@ -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.
|
||||
+1
-1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user