Skip to content

Commit

Permalink
Merge pull request #108 from infinum/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
bojankoma authored Aug 5, 2022
2 parents f43f808 + ce14798 commit 0255901
Show file tree
Hide file tree
Showing 20 changed files with 64 additions and 33 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

## Version 5.4.8

_2022-08-05_

* Update Kotlin to 1.7.10.
* Update dependencies to stable version.

## Version 5.4.7

_2022-06-10_
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.7"
releaseImplementation "com.infinum.dbinspector:dbinspector-no-op:5.4.7"
debugImplementation "com.infinum.dbinspector:dbinspector:5.4.8"
releaseImplementation "com.infinum.dbinspector:dbinspector-no-op:5.4.8"
```
**KotlinDSL**
```kotlin
debugImplementation("com.infinum.dbinspector:dbinspector:5.4.7")
releaseImplementation("com.infinum.dbinspector:dbinspector-no-op:5.4.7")
debugImplementation("com.infinum.dbinspector:dbinspector:5.4.8")
releaseImplementation("com.infinum.dbinspector:dbinspector-no-op:5.4.8")
```

### Usage
Expand Down
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,9 @@ task runStaticChecks(dependsOn: [
group = "Verification"
description = "Run static checks on all modules"
}

task cleanMavenLocal {
doLast {
new File('~/.m2/repository/example').deleteDir()
}
}
8 changes: 6 additions & 2 deletions config.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
ext {
def major = 5
def minor = 4
def patch = 8

buildConfig = [
"minSdk" : 21,
"compileSdk": 32,
Expand All @@ -7,7 +11,7 @@ ext {
]
releaseConfig = [
"group" : "com.infinum.dbinspector",
"version" : "5.4.7",
"versionCode": 5 * 100 * 100 + 4 * 100 + 7
"version" : "$major.$minor.$patch",
"versionCode": major * 100 * 100 + minor * 100 + patch
]
}
7 changes: 7 additions & 0 deletions dbinspector-no-op/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ android {
sourceSets.each {
it.java.srcDirs += "src/$it.name/kotlin"
}

publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}

dependencies {
Expand Down
7 changes: 7 additions & 0 deletions dbinspector/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ android {
buildFeatures {
viewBinding true
}

publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ internal class RemoveIgnoredTableNameInteractor(
entity.toBuilder().removeIgnoredTableNames(indexed.first).build()
}
}
} ?: throw IllegalStateException("Ignored table name cannot be empty or blank.")
} ?: error("Ignored table name cannot be empty or blank.")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ internal class SaveIgnoredTableNameInteractor(
)
.build()
}
} ?: throw IllegalStateException("Ignored table name cannot be empty or blank.")
} ?: error("Ignored table name cannot be empty or blank.")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal class Delete {

fun build(): String {
if (!::table.isInitialized) {
throw IllegalStateException("Failed to build - target table is undefined")
error("Failed to build - target table is undefined")
}
return toString()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal class DropTrigger {

fun build(): String {
if (!::trigger.isInitialized) {
throw IllegalStateException("Failed to build - target view is undefined")
error("Failed to build - target view is undefined")
}
return toString()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal class DropView {

fun build(): String {
if (!::view.isInitialized) {
throw IllegalStateException("Failed to build - target view is undefined")
error("Failed to build - target view is undefined")
}
return toString()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal class Pragma {

fun build(): String {
if (!::pragmaName.isInitialized) {
throw IllegalStateException("Failed to build - pragmaName is undefined")
error("Failed to build - pragmaName is undefined")
}
return toString()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal class Select {

fun columns(vararg columns: String) {
if (this.columns.isNotEmpty()) {
throw IllegalStateException("Detected an attempt to re-define columns to fetch.")
error("Detected an attempt to re-define columns to fetch.")
}
this.columns.addAll(columns)
}
Expand All @@ -39,7 +39,7 @@ internal class Select {
throw IllegalArgumentException("At least one column should be defined")
}
if (this.orderByColumns.isNotEmpty()) {
throw IllegalStateException("Detected an attempt to re-define ORDER BY columns.")
error("Detected an attempt to re-define ORDER BY columns.")
}
this.orderByColumns = columns.toList().filterNotNull()
}
Expand All @@ -50,7 +50,7 @@ internal class Select {

fun build(): String {
if (!::table.isInitialized) {
throw IllegalStateException("Failed to build - target table is undefined")
error("Failed to build - target table is undefined")
}
return toString()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal class Eq(
}

override fun addCondition(condition: Condition) {
throw IllegalStateException("Can't add a nested condition to 'eq'")
error("Can't add a nested condition to 'eq'")
}

override fun toString(): String =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ internal class Like(
}

override fun addCondition(condition: Condition): Unit =
throw IllegalStateException("Can't add a nested condition to 'like'")
error("Can't add a nested condition to 'like'")

override fun toString(): String =
"$column LIKE \"%%$value%%\""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal class LifecycleConnectionDelegate(
.currentState
.isAtLeast(Lifecycle.State.INITIALIZED).not()
) {
throw IllegalStateException("Owner has not passed created yet.")
error("Owner has not passed created yet.")
}

val extras = when (thisRef) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ internal class ViewBindingDelegate<T : ViewBinding>(
.currentState
.isAtLeast(Lifecycle.State.INITIALIZED).not()
) {
throw IllegalStateException("Fragment views are not created yet.")
error("Fragment views are not created yet.")
}

viewBindingFactory(thisRef.requireView()).also { this.binding = it }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ internal class SplitLinearLayout @JvmOverloads constructor(

private fun checkChildCount() {
if (childCount != 2) {
throw IllegalStateException("SplitLinearLayout must have exactly 2 child views.")
error("SplitLinearLayout must have exactly 2 child views.")
}
}

Expand Down
22 changes: 11 additions & 11 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[versions]
dbinspector = "5.4.7"
gradle = "7.2.1"
kotlin = "1.7.0"
coroutines = "1.6.2"
dbinspector = "5.4.8"
gradle = "7.2.2"
kotlin = "1.7.10"
coroutines = "1.6.4"
core = "1.8.0"
appcompat = "1.4.2"
activity = "1.4.0"
fragment = "1.4.1"
lifecycle = "2.4.1"
activity = "1.5.1"
fragment = "1.5.1"
lifecycle = "2.5.1"
viewpager = "1.0.0"
paging = "3.1.1"
recyclerview = "1.2.1"
Expand All @@ -16,14 +16,14 @@ swiperefresh = "1.1.0"
datastore = "1.0.0"
dynamicanimation = "1.0.0"
design = "1.6.1"
protobuf-core = "3.21.1"
protobuf-plugin = "0.8.18"
protobuf-core = "3.21.4"
protobuf-plugin = "0.8.19"
koin = "3.2.0"
detekt = "1.20.0"
detekt = "1.21.0"
ktlintplugin = "10.3.0"
ktlint = "0.45.2"
cpd = "3.2"
dokka = "1.6.21"
dokka = "1.7.10"
kover = "0.5.1"
jacoco = "0.8.8"
intellij = "1.0.647"
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ enableFeaturePreview("VERSION_CATALOGS")

rootProject.name="DbInspector"

include "dbinspector"
include "dbinspector-no-op"
include ":dbinspector"
include ":dbinspector-no-op"
include ":sample"

0 comments on commit 0255901

Please sign in to comment.