Skip to content

Commit

Permalink
Merge pull request #102 from infinum/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
bojankoma authored Dec 29, 2021
2 parents d5b0aa4 + 4cfd0f9 commit 72270fd
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
=========

## Version 5.4.3

_2021-12-29_

* Fix implicit Kotlin 1.6 changes on static show methods.

## Version 5.4.2

_2021-12-24_
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ Then add the following dependencies in your app `build.gradle` or `build.gradle.

**Groovy**
```groovy
debugImplementation "com.infinum.dbinspector:dbinspector:5.4.2"
releaseImplementation "com.infinum.dbinspector:dbinspector-no-op:5.4.2"
debugImplementation "com.infinum.dbinspector:dbinspector:5.4.3"
releaseImplementation "com.infinum.dbinspector:dbinspector-no-op:5.4.3"
```
**KotlinDSL**
```kotlin
debugImplementation("com.infinum.dbinspector:dbinspector:5.4.2")
releaseImplementation("com.infinum.dbinspector:dbinspector-no-op:5.4.2")
debugImplementation("com.infinum.dbinspector:dbinspector:5.4.3")
releaseImplementation("com.infinum.dbinspector:dbinspector-no-op:5.4.3")
```

### Usage
Expand Down
4 changes: 2 additions & 2 deletions config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ext {
]
releaseConfig = [
"group" : "com.infinum.dbinspector",
"version" : "5.4.2",
"versionCode": 5 * 100 * 100 + 4 * 100 + 2
"version" : "5.4.3",
"versionCode": 5 * 100 * 100 + 4 * 100 + 3
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

package com.infinum.dbinspector

import com.infinum.dbinspector.data.sources.memory.logger.EmptyLogger
import com.infinum.dbinspector.data.sources.memory.logger.Logger

@Suppress("UnusedPrivateMember")
public object DbInspector {

@JvmStatic
public fun show(logger: Logger = EmptyLogger()): Unit = Unit
@JvmOverloads
public fun show(logger: Logger? = null): Unit = Unit
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import com.infinum.dbinspector.ui.databases.DatabasesActivity
public object DbInspector {

@JvmStatic
public fun show(logger: Logger = EmptyLogger()) {
@JvmOverloads
public fun show(logger: Logger? = null) {
Presentation.setLogger(logger)
with(Presentation.applicationContext()) {
this.startActivity(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ internal object Presentation {
this.context = context
}

fun setLogger(logger: Logger) {
LibraryKoin.setLibraryLogger(logger)
fun setLogger(logger: Logger? = null) {
logger?.let { LibraryKoin.setLibraryLogger(it) }
}

fun applicationContext(): Context {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
dbinspector = "5.4.2"
dbinspector = "5.4.3"
gradle = "7.0.4"
kotlin = "1.6.10"
coroutines = "1.6.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.infinum.dbinspector.sample
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.infinum.dbinspector.DbInspector
import com.infinum.dbinspector.data.sources.memory.logger.AndroidLogger
import com.infinum.dbinspector.sample.databinding.ActivityMainBinding
import org.koin.androidx.viewmodel.ext.android.viewModel

Expand All @@ -20,7 +19,7 @@ class MainActivity : AppCompatActivity() {
.also { setContentView(it.root) }
.also {
it.show.setOnClickListener {
DbInspector.show(AndroidLogger())
DbInspector.show()
}
}

Expand Down

0 comments on commit 72270fd

Please sign in to comment.