-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2.0.0' into feat-component-scan-glob
- Loading branch information
Showing
41 changed files
with
897 additions
and
429 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
examples/android-library/src/main/java/org/koin/sample/clients/ClientModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.koin.sample.clients | ||
|
||
import io.ktor.client.HttpClient | ||
import io.ktor.client.engine.cio.CIO | ||
import org.koin.core.annotation.Module | ||
import org.koin.core.annotation.Named | ||
import org.koin.core.annotation.Single | ||
|
||
@Module(includes = [ClientModuleA::class, ClientModuleB::class]) | ||
class ClientModule | ||
|
||
@Module | ||
class ClientModuleA { | ||
|
||
@Single | ||
@Named("clientA") | ||
fun createClient() = HttpClient(CIO) {} | ||
} | ||
|
||
@Module | ||
class ClientModuleB { | ||
|
||
@Single | ||
@Named("clientB") | ||
fun createClient() = HttpClient(CIO) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
examples/other-ksp/src/main/kotlin/org/koin/example/by/example/ByExampleSingle.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.koin.example.by.example | ||
|
||
import org.koin.core.annotation.ComponentScan | ||
import org.koin.core.annotation.Module | ||
import org.koin.core.annotation.Single | ||
|
||
@Module | ||
@ComponentScan | ||
public class ByModule | ||
|
||
@Single | ||
public class ByExampleSingle |
16 changes: 16 additions & 0 deletions
16
examples/other-ksp/src/main/kotlin/org/koin/example/defaultparam/DefaultParam.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.koin.example.defaultparam | ||
|
||
import org.koin.core.annotation.ComponentScan | ||
import org.koin.core.annotation.Factory | ||
import org.koin.core.annotation.InjectedParam | ||
import org.koin.core.annotation.Module | ||
|
||
@Module | ||
@ComponentScan | ||
public class MyModule | ||
|
||
public const val COMPONENT_DEFAULT: String = "default" | ||
|
||
@Factory | ||
public class Component(@InjectedParam public val param: String = COMPONENT_DEFAULT) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/bin/sh | ||
|
||
./gradlew testDebug --no-build-cache | ||
./gradlew :other-ksp:test :coffee-maker:test :compile-perf:test --no-build-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.