Skip to content

Commit

Permalink
Test Bom in project + fix back KMP logger
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudgiuliani committed Aug 31, 2023
1 parent 565f642 commit 40cc6cd
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,6 @@ class AndroidModuleTest : KoinTest {
modules(SampleModule)
}.koin

assertTrue(koin.logger is PrintLogger)
assertTrue(koin.logger is EmptyLogger)
}
}
2 changes: 1 addition & 1 deletion bom/koin-bom/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies {
api "io.insert-koin:koin-android-compat:$koin_android_version"
api "io.insert-koin:koin-android-test:$koin_android_version"
api "io.insert-koin:koin-androidx-navigation:$koin_android_version"
api "io.insert-koin:koin-androidx-workmnanager:$koin_android_version"
api "io.insert-koin:koin-androidx-workmanager:$koin_android_version"
// compose
api "io.insert-koin:koin-androidx-compose:$koin_androidx_compose_version"
api "io.insert-koin:koin-androidx-compose-navigation:$koin_androidx_compose_version"
Expand Down
2 changes: 0 additions & 2 deletions core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ import org.koin.core.component.getScopeName
import org.koin.core.error.ScopeNotCreatedException
import org.koin.core.extension.ExtensionManager
import org.koin.core.logger.EmptyLogger
import org.koin.core.logger.Level
import org.koin.core.logger.Logger
import org.koin.core.logger.PrintLogger
import org.koin.core.module.Module
import org.koin.core.module.flatten
import org.koin.core.parameter.ParametersDefinition
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package org.koin.core.logger
* Logger that print on system.out
* @author - Arnaud GIULIANI
*/
actual class PrintLogger actual constructor(level: Level) : Logger(level) {
class PrintLogger(level: Level = Level.INFO) : Logger(level) {

override fun display(level: Level, msg: MESSAGE) {
println("[$level] $KOIN_TAG $msg")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package org.koin.core.logger
* Logger that print on system.out
* @author - Arnaud GIULIANI
*/
actual class PrintLogger actual constructor(level: Level) : Logger(level) {
class PrintLogger(level: Level = Level.INFO) : Logger(level) {

private val printer = if (level >= Level.WARNING) System.err else System.out

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package org.koin.core.logger
* Logger that print on system.out
* @author - Arnaud GIULIANI
*/
actual class PrintLogger actual constructor(level: Level) : Logger(level) {
class PrintLogger(level: Level = Level.INFO) : Logger(level) {

override fun display(level: Level, msg: MESSAGE) {
println("[$level] $KOIN_TAG $msg")
Expand Down
22 changes: 10 additions & 12 deletions examples/androidx-samples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,19 @@ android {
}

dependencies {
// Leak
implementation 'com.squareup.leakcanary:leakcanary-android:2.7'

// Koin
implementation "io.insert-koin:koin-android:$koin_android_version"
implementation "io.insert-koin:koin-core-coroutines:$koin_version"
implementation "io.insert-koin:koin-androidx-workmanager:$koin_android_version"
implementation "io.insert-koin:koin-androidx-navigation:$koin_android_version"
testImplementation "io.insert-koin:koin-test-junit4:$koin_version"

implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "androidx.work:work-runtime-ktx:2.8.1"
// implementation "org.jetbrains.anko:anko-commons:0.10.4"

testImplementation "io.insert-koin:koin-android-test:$koin_android_version"
implementation 'com.squareup.leakcanary:leakcanary-android:2.7'
testImplementation 'androidx.arch.core:core-testing:2.2.0'
testImplementation "junit:junit:4.13.2"

// Koin
implementation platform("io.insert-koin:koin-bom:$koin_android_version")
implementation "io.insert-koin:koin-android"
implementation "io.insert-koin:koin-core-coroutines"
implementation "io.insert-koin:koin-androidx-workmanager"
implementation "io.insert-koin:koin-androidx-navigation"
testImplementation "io.insert-koin:koin-test-junit4"
testImplementation "io.insert-koin:koin-android-test"
}

0 comments on commit 40cc6cd

Please sign in to comment.