Rename anvil modules to annotations and codegen

This commit is contained in:
Benoit Marty
2025-09-05 14:12:07 +02:00
parent 606b1d132e
commit 4e720cecb1
134 changed files with 130 additions and 142 deletions

1
annotations/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

View File

@@ -0,0 +1,14 @@
/*
* 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.
*/
plugins {
alias(libs.plugins.kotlin.jvm)
id("com.android.lint")
}
dependencies {
api(libs.inject)
}

View File

@@ -0,0 +1,30 @@
/*
* Copyright 2023, 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.annotations
import kotlin.reflect.KClass
/**
* Adds Node to the specified component graph.
* Equivalent to the following declaration:
*
* @BindingContainer
* @ContributesTo(Scope::class)
* abstract class YourNodeModule {
* @Binds
* @IntoMap
* @NodeKey(YourNode::class)
* abstract fun bindYourNodeFactory(factory: YourNode.Factory): AssistedNodeFactory<*>
*}
*/
@Target(AnnotationTarget.CLASS)
annotation class ContributesNode(
val scope: KClass<*>,
)