Skip to content
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
019fee3
Bump AGP
KCeh Feb 1, 2026
621b3b5
Remove ktlint
KCeh Feb 1, 2026
a94312f
Remove deprecated gradle option
KCeh Feb 1, 2026
708fb27
Bump build tools, misSdk, compileSdk and targetSdk
KCeh Feb 1, 2026
97371c3
Use locally build libs in sample app
KCeh Feb 1, 2026
792ed88
Fix CI flow
KCeh Feb 1, 2026
f72d3f0
Bump dependencies
KCeh Feb 1, 2026
87371be
Fix compile warning for default param property
KCeh Feb 1, 2026
311120b
Fix VM deprecated package warning
KCeh Feb 1, 2026
0e55a80
Fix detekt
KCeh Feb 2, 2026
a3076f0
Fix edge to edge
KCeh Feb 2, 2026
467cc45
Merge pull request #120 from infinum/fix/edge-to-edge
KCeh Feb 4, 2026
954b6fd
Update JVM compatibility to 17
KCeh Feb 4, 2026
f641b58
Downgrade Junit to avoid conflict with koin-junit
KCeh Feb 4, 2026
37b43a6
Merge branch 'housekeeping/update-dependencies-02-26' of https://gith…
KCeh Feb 4, 2026
2027af6
Merge pull request #119 from infinum/housekeeping/update-dependencies…
KCeh Feb 4, 2026
8b8e602
Initial plan
Copilot Feb 4, 2026
473a24c
Fix DatabasesActivity crash in no-op version by calling finish() in o…
Copilot Feb 4, 2026
90a3b34
Merge pull request #122 from infinum/copilot/implement-solution-for-i…
KCeh Feb 5, 2026
2fb535c
Bump version
KCeh Feb 5, 2026
39909d0
Refactor deprecated kotlin options
KCeh Feb 8, 2026
09d1b73
Update dokka for publishing tasks
KCeh Feb 8, 2026
45f8dc7
Merge pull request #123 from infinum/housekeeping/upgrade-deprecated-…
KCeh Feb 8, 2026
02d4d9a
Update changelog
KCeh Feb 8, 2026
144e9ae
Add test output to console
KCeh Feb 8, 2026
96cb14c
Bump versions in readme
KCeh Feb 9, 2026
deba8bf
Bump db inspector version in libs.versions file
KCeh Feb 9, 2026
cf16dd8
Update publishing config
KCeh Feb 9, 2026
4c5e369
Fix changelog
KCeh Feb 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 1 addition & 39 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,47 +56,9 @@ jobs:
- name: Stop Gradle
run: ./gradlew --stop

ktlint:
name: ktlint
needs: [ validation ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Save Gradle Caches
uses: actions/cache@v4
with:
path: ~/.gradle/caches/
key: gradle-caches-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-caches-${{ runner.os }}-
- name: ktlint
run: ./gradlew ktlintAll
- name: Stop Gradle
run: ./gradlew --stop

cpd:
name: CPD
needs: [ validation ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Save Gradle Caches
uses: actions/cache@v4
with:
path: ~/.gradle/caches/
key: gradle-caches-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-caches-${{ runner.os }}-
- name: CPD
run: ./gradlew cpdAll
- name: Stop Gradle
run: ./gradlew --stop

tests:
name: Tests
needs: [ validation, lint, detekt, ktlint, cpd ]
needs: [ validation, lint, detekt ]
Comment thread
KCeh marked this conversation as resolved.
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
Changelog
=========

## Version 6.0.0

_2026-02-10_

* minSdk bumped to 24
* Compile with SDK 36
* Update Kotlin to 2.2.21.
* Update dependencies to stable version.
* Fix edge-to-edge
* Fix edge case no-op DatabasesActivity crash

## Version 5.4.9

_2022-10-21_
Expand Down
24 changes: 1 addition & 23 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ buildscript {
dependencies {
classpath libs.tools.gradle
classpath libs.kotlin.gradle
classpath libs.cpd
classpath libs.detekt.gradle
classpath libs.ktlint
classpath libs.dokka
classpath libs.protobuf.gradle
classpath libs.kover
Expand All @@ -29,9 +27,7 @@ allprojects {
}

subprojects {
apply from: "$rootDir/cpd.gradle"
apply from: "$rootDir/detekt.gradle"
apply from: "$rootDir/ktlint.gradle"
apply from: "$rootDir/dokka.gradle"
}

Expand All @@ -57,27 +53,9 @@ task detektAll(dependsOn: [
description = "Run Detekt on all modules"
}

task ktlintAll(dependsOn: [
':dbinspector:ktlintCheck',
':dbinspector-no-op:ktlintCheck'
]) {
group = "Verification"
description = "Run Ktlint on all modules"
}

task cpdAll(dependsOn: [
':dbinspector:cpdCheck',
':dbinspector-no-op:cpdCheck'
]) {
group = "Verification"
description = "Run CPD on all modules"
}

task runStaticChecks(dependsOn: [
':lintAll',
':detektAll',
':ktlintAll',
':cpdAll'
':detektAll'
]) {
group = "Verification"
description = "Run static checks on all modules"
Expand Down
14 changes: 7 additions & 7 deletions config.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ext {
def major = 5
def minor = 4
def patch = 9
def major = 6
def minor = 0
def patch = 0

buildConfig = [
"minSdk" : 21,
"compileSdk": 33,
"targetSdk" : 33,
"buildTools": "33.0.0"
"minSdk" : 24,
"compileSdk": 36,
"targetSdk" : 36,
"buildTools": "35.0.0"
]
releaseConfig = [
"group" : "com.infinum.dbinspector",
Expand Down
12 changes: 0 additions & 12 deletions cpd.gradle

This file was deleted.

28 changes: 15 additions & 13 deletions dbinspector-no-op/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id "com.android.library"
id "kotlin-android"
Expand All @@ -10,18 +12,15 @@ android {
defaultConfig {
minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.targetSdk
versionCode releaseConfig.versionCode
versionName releaseConfig.version
}

buildTypes {
debug {
testCoverageEnabled true
debuggable true
minifyEnabled false
enableUnitTestCoverage true
enableAndroidTestCoverage true
}
release {
debuggable false
minifyEnabled true
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.txt"
}
Expand All @@ -31,16 +30,19 @@ android {
resourcePrefix "dbinspector_"

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
freeCompilerArgs += [
'-Xexplicit-api=strict',
'-Xjvm-default=all'
]
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
freeCompilerArgs.addAll([
'-Xexplicit-api=strict',
'-Xjvm-default=all',
'-Xannotation-default-target=param-property'
])
}
}

sourceSets.each {
Expand Down
6 changes: 3 additions & 3 deletions dbinspector-no-op/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ task sourcesJar(type: Jar) {
from android.sourceSets.main.kotlin.srcDirs
}

task javadocsJar(type: Jar, dependsOn: "dokkaJavadoc") {
archiveClassifier.set("javadoc")
from dokkaJavadoc.outputDirectory
task javadocsJar(type: Jar, dependsOn: "dokkaGenerate") {
getArchiveClassifier().set("javadoc")
from layout.buildDirectory.dir("javadoc")
}

afterEvaluate {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
package com.infinum.dbinspector.ui.databases

import android.app.Activity
import android.os.Bundle

internal class DatabasesActivity : Activity()
internal class DatabasesActivity : Activity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
finish()
}
}
39 changes: 25 additions & 14 deletions dbinspector/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id "com.android.library"
id "kotlin-android"
Expand All @@ -13,18 +15,15 @@ android {
defaultConfig {
minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.targetSdk
versionCode releaseConfig.versionCode
versionName releaseConfig.version
}

buildTypes {
debug {
testCoverageEnabled true
debuggable true
minifyEnabled false
enableUnitTestCoverage true
enableAndroidTestCoverage true
}
release {
debuggable false
minifyEnabled true
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.txt"
}
Expand All @@ -38,22 +37,33 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
freeCompilerArgs += [
'-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi',
'-Xexplicit-api=strict',
'-Xjvm-default=all'
]
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
freeCompilerArgs.addAll([
'-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi',
'-Xexplicit-api=strict',
'-Xjvm-default=all',
'-Xannotation-default-target=param-property'
])
}
}

testOptions {
unitTests.returnDefaultValues = true
unitTests.all {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
exceptionFormat "full"
showExceptions true
showCauses true
showStackTraces true
}

kover {
enabled = name == "testDebugUnitTest"
includes = [
Expand Down Expand Up @@ -91,6 +101,7 @@ android {
}

buildFeatures {
buildConfig = true
viewBinding true
}

Expand Down
6 changes: 3 additions & 3 deletions dbinspector/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ task sourcesJar(type: Jar) {
from android.sourceSets.main.kotlin.srcDirs
}

task javadocsJar(type: Jar, dependsOn: "dokkaJavadoc") {
archiveClassifier.set("javadoc")
from dokkaJavadoc.outputDirectory
task javadocsJar(type: Jar, dependsOn: "dokkaGenerate") {
getArchiveClassifier().set("javadoc")
from layout.buildDirectory.dir("javadoc")
Comment thread
KCeh marked this conversation as resolved.
}

afterEvaluate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ internal class Select {
fun orderBy(sort: Sort, vararg columns: String?) {
this.orderByDirection = sort

if (columns.isEmpty()) {
throw IllegalArgumentException("At least one column should be defined")
}
require(columns.isNotEmpty()) { "At least one column should be defined" }
if (this.orderByColumns.isNotEmpty()) {
error("Detected an attempt to re-define ORDER BY columns.")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ internal class Eq(
) : Condition() {

init {
if (value != null && value !is Number && value !is String) {
throw IllegalArgumentException("Only null, number and string values can be used in the 'WHERE' clause")
require(value == null || value is Number || value is String) {
"Only null, number and string values can be used in the 'WHERE' clause"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ internal class Like(
) : Condition() {

init {
val isNotNumber = value !is Number
val isNotString = value !is String
if (isNotNumber && isNotString) {
throw IllegalArgumentException("Only number and string values can be used in the 'LIKE' condition")
require(value is Number || value is String) {
"Only number and string values can be used in the 'LIKE' condition"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ internal fun ByteArray.toHexString(): String {
return buffer.toString()
}

@Suppress("MagicNumber")
@Suppress("MagicNumber", "UnusedPrivateProperty")
internal fun ByteArray.toBase64String(): String {
Comment thread
KCeh marked this conversation as resolved.
val table = (CharRange('A', 'Z') + CharRange('a', 'z') + CharRange('0', '9') + '+' + '/').toCharArray()
val output = ByteArrayOutputStream()
Expand All @@ -36,14 +36,14 @@ internal fun ByteArray.toBase64String(): String {
var b = this[position].toInt() and 0xFF shl 16 and 0xFFFFFF
if (position + 1 < this.size) b = b or (this[position + 1].toInt() and 0xFF shl 8) else padding++
if (position + 2 < this.size) b = b or (this[position + 2].toInt() and 0xFF) else padding++
(0 until 4 - padding).forEach { _ ->
for (i in 0 until 4 - padding) {
Comment thread
KCeh marked this conversation as resolved.
val c = b and 0xFC0000 shr 18
output.write(table[c].code)
b = b shl 6
}
position += 3
}
(0 until padding).forEach { _ ->
for (i in 0 until padding) {
Comment thread
KCeh marked this conversation as resolved.
output.write('='.code)
}
return String(output.toByteArray())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import com.infinum.dbinspector.ui.schema.tables.TablesViewModel
import com.infinum.dbinspector.ui.schema.triggers.TriggersViewModel
import com.infinum.dbinspector.ui.schema.views.ViewsViewModel
import com.infinum.dbinspector.ui.settings.SettingsViewModel
import org.koin.androidx.viewmodel.dsl.viewModel
import org.koin.core.module.dsl.viewModel
import org.koin.core.module.Module
import org.koin.dsl.module

Expand Down
Loading
Loading