Skip to content

Commit af6f6b5

Browse files
2.3.2-Beta1 - Unlock back @singleton Koin annotations (with properties)
1 parent 1d4c1af commit af6f6b5

4 files changed

Lines changed: 6 additions & 7 deletions

File tree

projects/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ org.gradle.parallel=true
77
#Kotlin
88
kotlin.code.style=official
99
#Koin
10-
koinAnnotationsVersion=2.3.1
10+
koinAnnotationsVersion=2.3.2-Beta1
1111
#Android
1212
android.useAndroidX=true
1313
androidMinSDK=14

projects/gradle/libs.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# /!\ Koin in gradle.properties /!\
44

55
# Core
6-
kotlin = "2.2.20"
7-
koin = "4.1.0"
8-
ksp = "2.3.2"
6+
kotlin = "2.2.21"
7+
koin = "4.1.1"
8+
ksp = "2.3.3"
99
publish = "2.0.0"
1010
dokka = "1.9.10"
1111
nmcp = "1.0.1"

projects/koin-annotations/src/commonMain/kotlin/org/koin/core/annotation/CoreAnnotations.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ annotation class Single(val binds: Array<KClass<*>> = [Unit::class], val created
4646
* same as @Single
4747
* @see Single
4848
*/
49-
//TODO to be removed in favor of jsr330
50-
@Deprecated("in favor of koin-jsr330 - @Singleton", level = DeprecationLevel.ERROR)
5149
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
5250
annotation class Singleton(val binds: Array<KClass<*>> = [Unit::class], val createdAtStart: Boolean = false)
5351

projects/koin-ksp-compiler/src/jvmMain/kotlin/org/koin/compiler/metadata/AnnotationMetadata.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ data class DefinitionNamedAnnotation(
5252
) :DefinitionAnnotation
5353

5454
val SINGLE = DefinitionClassAnnotation("single", annotationType = Single::class)
55+
val KOIN_SINGLETON = DefinitionClassAnnotation("single", annotationType = Singleton::class)
5556
val SINGLETON = DefinitionNamedAnnotation("single", null, "Singleton","jakarta.inject.Singleton")
5657
val JAVAX_SINGLETON = DefinitionNamedAnnotation("single", null, "Singleton","javax.inject.Singleton")
5758
val FACTORY = DefinitionClassAnnotation("factory", annotationType = Factory::class)
@@ -66,7 +67,7 @@ val KOIN_VIEWMODEL = DefinitionClassAnnotation("viewModel", "org.koin.core.modul
6667

6768
val KOIN_WORKER = DefinitionClassAnnotation("worker", "org.koin.androidx.workmanager.dsl.worker", KoinWorker::class)
6869

69-
val DEFINITION_ANNOTATION_LIST = listOf(SINGLE, SINGLETON, JAVAX_SINGLETON, FACTORY, INJECT, JAVAX_INJECT, SCOPE, SCOPED, KOIN_VIEWMODEL, KOIN_WORKER) + SCOPE_ARCHETYPES_LIST
70+
val DEFINITION_ANNOTATION_LIST = listOf(SINGLE, KOIN_SINGLETON, SINGLETON, JAVAX_SINGLETON, FACTORY, INJECT, JAVAX_INJECT, SCOPE, SCOPED, KOIN_VIEWMODEL, KOIN_WORKER) + SCOPE_ARCHETYPES_LIST
7071

7172
val DEFINITION_ANNOTATION_LIST_TYPES = DEFINITION_ANNOTATION_LIST.map { it.annotationQualifiedName }
7273
val DEFINITION_ANNOTATION_LIST_NAMES = DEFINITION_ANNOTATION_LIST.map { it.annotationSimpleName.lowercase(Locale.getDefault()) }

0 commit comments

Comments
 (0)