Skip to content

Commit

Permalink
clean up DslMarker stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudgiuliani committed Dec 14, 2022
1 parent 58d68f4 commit 2bfac92
Show file tree
Hide file tree
Showing 29 changed files with 18 additions and 281 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import java.util.*
* @param level
*/
@OptIn(KoinInternalApi::class)
@KoinApplicationDslMarker

fun KoinApplication.androidLogger(
level: Level = Level.INFO,
): KoinApplication {
Expand All @@ -52,7 +52,7 @@ fun KoinApplication.androidLogger(
* Add Context instance to Koin container
* @param androidContext - Context
*/
@KoinApplicationDslMarker

fun KoinApplication.androidContext(androidContext: Context): KoinApplication {
if (koin.logger.isAt(Level.INFO)) {
koin.logger.info("[init] declare Android Context")
Expand All @@ -77,7 +77,7 @@ fun KoinApplication.androidContext(androidContext: Context): KoinApplication {
* @param koinPropertyFile
*/
@OptIn(KoinInternalApi::class)
@KoinApplicationDslMarker

fun KoinApplication.androidFileProperties(
koinPropertyFile: String = "koin.properties",
): KoinApplication {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ package org.koin.androidx.fragment.dsl
import androidx.fragment.app.Fragment
import org.koin.core.annotation.KoinInternalApi
import org.koin.core.definition.KoinDefinition
import org.koin.core.module.KoinDslMarker
import org.koin.core.module.Module
import org.koin.core.module.dsl.*

Expand All @@ -31,7 +30,6 @@ import org.koin.core.module.dsl.*
* @author Arnaud Giuliani
* @see new
*/
@KoinDslMarker
inline fun <reified R : Fragment> Module.fragmentOf(
crossinline constructor: () -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -40,7 +38,6 @@ inline fun <reified R : Fragment> Module.fragmentOf(
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1> Module.fragmentOf(
crossinline constructor: (T1) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -49,7 +46,6 @@ inline fun <reified R : Fragment, reified T1> Module.fragmentOf(
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2> Module.fragmentOf(
crossinline constructor: (T1, T2) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -58,7 +54,6 @@ inline fun <reified R : Fragment, reified T1, reified T2> Module.fragmentOf(
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3> Module.fragmentOf(
crossinline constructor: (T1, T2, T3) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -67,7 +62,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3> Module.fra
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -76,7 +70,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -85,7 +78,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5, T6) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -94,7 +86,7 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker

inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5, T6, T7) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -103,7 +95,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7, reified T8> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -112,7 +103,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7, reified T8, reified T9> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -121,7 +111,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7, reified T8, reified T9, reified T10> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -130,7 +119,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7, reified T8, reified T9, reified T10, reified T11> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -139,7 +127,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7, reified T8, reified T9, reified T10, reified T11, reified T12> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -148,7 +135,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7, reified T8, reified T9, reified T10, reified T11, reified T12, reified T13> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -157,7 +143,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7, reified T8, reified T9, reified T10, reified T11, reified T12, reified T13, reified T14> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -166,7 +151,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7, reified T8, reified T9, reified T10, reified T11, reified T12, reified T13, reified T14, reified T15> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -175,7 +159,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7, reified T8, reified T9, reified T10, reified T11, reified T12, reified T13, reified T14, reified T15, reified T16> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -184,7 +167,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7, reified T8, reified T9, reified T10, reified T11, reified T12, reified T13, reified T14, reified T15, reified T16, reified T17> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -193,7 +175,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7, reified T8, reified T9, reified T10, reified T11, reified T12, reified T13, reified T14, reified T15, reified T16, reified T17, reified T18> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -202,7 +183,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7, reified T8, reified T9, reified T10, reified T11, reified T12, reified T13, reified T14, reified T15, reified T16, reified T17, reified T18, reified T19> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -211,7 +191,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7, reified T8, reified T9, reified T10, reified T11, reified T12, reified T13, reified T14, reified T15, reified T16, reified T17, reified T18, reified T19, reified T20> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -220,7 +199,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7, reified T8, reified T9, reified T10, reified T11, reified T12, reified T13, reified T14, reified T15, reified T16, reified T17, reified T18, reified T19, reified T20, reified T21> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand All @@ -229,7 +207,6 @@ inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4
/**
* @see fragmentOf
*/
@KoinDslMarker
inline fun <reified R : Fragment, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7, reified T8, reified T9, reified T10, reified T11, reified T12, reified T13, reified T14, reified T15, reified T16, reified T17, reified T18, reified T19, reified T20, reified T21, reified T22> Module.fragmentOf(
crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) -> R,
noinline options: DefinitionOptions<R>? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import org.koin.core.annotation.KoinReflectAPI
import org.koin.core.definition.Definition
import org.koin.core.definition.KoinDefinition
import org.koin.core.instance.newInstance
import org.koin.core.module.KoinDslMarker
import org.koin.core.module.Module
import org.koin.core.qualifier.Qualifier

Expand All @@ -33,7 +32,6 @@ import org.koin.core.qualifier.Qualifier
* @param qualifier - definition qualifier
* @param override - allow definition override
*/
@KoinDslMarker
inline fun <reified T : Fragment> Module.fragment(
qualifier: Qualifier? = null,
noinline definition: Definition<T>
Expand Down
Loading

0 comments on commit 2bfac92

Please sign in to comment.