Skip to content

Commit

Permalink
Use unique module names (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
05nelsonm authored Oct 24, 2024
1 parent 52c63ef commit 270fc22
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 32 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ I'm guessing this is not really a factor on iOS."
<!-- TAG_DEPENDENCIES -->
[badge-kotlin]: https://img.shields.io/badge/kotlin-1.9.24-blue.svg?logo=kotlin
[badge-coroutines]: https://img.shields.io/badge/coroutines-1.8.1-blue.svg?logo=kotlin
[badge-encoding]: https://img.shields.io/badge/encoding-2.2.1-blue.svg?style=flat
[badge-immutable]: https://img.shields.io/badge/immutable-0.1.3-blue.svg?style=flat
[badge-encoding]: https://img.shields.io/badge/encoding-2.2.2-blue.svg?style=flat
[badge-immutable]: https://img.shields.io/badge/immutable-0.1.4-blue.svg?style=flat
[badge-sqldelight]: https://img.shields.io/badge/SQLDelight-2.0.2-blue.svg?style=flat
[badge-sqlite]: https://img.shields.io/badge/SQLite3-3.47.0-blue.svg?style=flat
[badge-sqlitemc]: https://img.shields.io/badge/SQLite3MultipleCiphers-1.9.0-blue.svg?style=flat
Expand Down
6 changes: 5 additions & 1 deletion build-logic/src/main/kotlin/-KmpConfigurationExtension.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ fun KmpConfigurationExtension.configureShared(
action: (Action<KmpConfigurationContainerDsl>)? = null,
) {
configure {
options {
useUniqueModuleNames = true
}

jvm {
kotlinJvmTarget = JavaVersion.VERSION_1_8
compileSourceCompatibility = JavaVersion.VERSION_1_8
Expand Down Expand Up @@ -59,7 +63,7 @@ fun KmpConfigurationExtension.configureShared(
fun KmpConfigurationContainerDsl.androidLibrary(
namespace: String,
buildTools: String? = "34.0.0",
compileSdk: Int = 33,
compileSdk: Int = 34,
minSdk: Int = 21,
javaVersion: JavaVersion = JavaVersion.VERSION_1_8,
action: (Action<TargetAndroidContainer.Library>)? = null,
Expand Down
16 changes: 8 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[versions]
androidx-startup = "1.1.1"
androidx-test-core = "1.5.0"
androidx-test-runner = "1.5.2"
androidx-startup = "1.2.0"
androidx-test-core = "1.6.1"
androidx-test-runner = "1.6.2"

encoding = "2.2.1"
encoding = "2.2.2"

gradle-android = "8.2.2"
gradle-binary-compat = "0.14.0"
gradle-binary-compat = "0.16.3"
gradle-build-config = "4.1.2"
gradle-cklib = "0.3.1"
gradle-kmp-configuration = "0.2.2"
gradle-kmp-configuration = "0.3.2"
gradle-kotlin = "1.9.24"
gradle-maven-publish = "0.28.0"
gradle-maven-publish = "0.30.0"

immutable = "0.1.3"
immutable = "0.1.4"

kotlinx-coroutines = "1.8.1"

Expand Down
5 changes: 0 additions & 5 deletions library/driver/api/android/driver.api
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ public abstract class io/toxicity/sqlite/mc/driver/PlatformDriver : app/cash/sql
public final fun beginTransaction (Ljava/sql/Connection;)V
public final fun close ()V
public final fun closeConnection (Ljava/sql/Connection;)V
public static final synthetic fun create$driver_release (Lio/toxicity/sqlite/mc/driver/config/FactoryConfig;Lio/toxicity/sqlite/mc/driver/EphemeralOpt;)Lio/toxicity/sqlite/mc/driver/PlatformDriver$Companion$Args;
public static final synthetic fun create$driver_release (Lio/toxicity/sqlite/mc/driver/config/FactoryConfig;Ljava/util/Map;Ljava/util/Map;)Lio/toxicity/sqlite/mc/driver/PlatformDriver$Companion$Args;
public final fun currentTransaction ()Lapp/cash/sqldelight/Transacter$Transaction;
public final fun endTransaction (Ljava/sql/Connection;)V
public final fun execute (Ljava/lang/Integer;Ljava/lang/String;ILkotlin/jvm/functions/Function1;)Lapp/cash/sqldelight/db/QueryResult;
Expand Down Expand Up @@ -126,7 +124,6 @@ public final class io/toxicity/sqlite/mc/driver/config/FilesystemConfig$Companio
public abstract class io/toxicity/sqlite/mc/driver/config/MCPragma {
public final field name Ljava/lang/String;
public synthetic fun <init> (Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/toxicity/sqlite/mc/driver/config/MCPragma$Transformer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public static final synthetic fun getALL$driver_release ()Ljava/util/Set;
public fun toString ()Ljava/lang/String;
}

Expand Down Expand Up @@ -453,8 +450,6 @@ public abstract class io/toxicity/sqlite/mc/driver/config/encryption/MCCipherCon
public final field legacy I
public final field legacyPageSize I
public synthetic fun <init> (Lio/toxicity/sqlite/mc/driver/config/encryption/Cipher;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
public static final fun checkKdfIter$driver_release (I)V
public static final fun checkLegacyPageSize$driver_release (I)V
public final fun equals (Ljava/lang/Object;)Z
public final fun hashCode ()I
public final fun toString ()Ljava/lang/String;
Expand Down
5 changes: 0 additions & 5 deletions library/driver/api/jvm/driver.api
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ public abstract class io/toxicity/sqlite/mc/driver/PlatformDriver : app/cash/sql
public final fun beginTransaction (Ljava/sql/Connection;)V
public final fun close ()V
public final fun closeConnection (Ljava/sql/Connection;)V
public static final synthetic fun create$driver (Lio/toxicity/sqlite/mc/driver/config/FactoryConfig;Lio/toxicity/sqlite/mc/driver/EphemeralOpt;)Lio/toxicity/sqlite/mc/driver/PlatformDriver$Companion$Args;
public static final synthetic fun create$driver (Lio/toxicity/sqlite/mc/driver/config/FactoryConfig;Ljava/util/Map;Ljava/util/Map;)Lio/toxicity/sqlite/mc/driver/PlatformDriver$Companion$Args;
public final fun currentTransaction ()Lapp/cash/sqldelight/Transacter$Transaction;
public final fun endTransaction (Ljava/sql/Connection;)V
public final fun execute (Ljava/lang/Integer;Ljava/lang/String;ILkotlin/jvm/functions/Function1;)Lapp/cash/sqldelight/db/QueryResult;
Expand Down Expand Up @@ -122,7 +120,6 @@ public final class io/toxicity/sqlite/mc/driver/config/FilesystemConfig$Companio
public abstract class io/toxicity/sqlite/mc/driver/config/MCPragma {
public final field name Ljava/lang/String;
public synthetic fun <init> (Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/toxicity/sqlite/mc/driver/config/MCPragma$Transformer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public static final synthetic fun getALL$driver ()Ljava/util/Set;
public fun toString ()Ljava/lang/String;
}

Expand Down Expand Up @@ -449,8 +446,6 @@ public abstract class io/toxicity/sqlite/mc/driver/config/encryption/MCCipherCon
public final field legacy I
public final field legacyPageSize I
public synthetic fun <init> (Lio/toxicity/sqlite/mc/driver/config/encryption/Cipher;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
public static final fun checkKdfIter$driver (I)V
public static final fun checkLegacyPageSize$driver (I)V
public final fun equals (Ljava/lang/Object;)Z
public final fun hashCode ()I
public final fun toString ()Ljava/lang/String;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import app.cash.sqldelight.db.SqlDriver
import app.cash.sqldelight.db.SqlPreparedStatement
import io.toxicity.sqlite.mc.driver.config.*
import io.toxicity.sqlite.mc.driver.config.MutableMCPragmas
import kotlin.jvm.JvmStatic
import kotlin.jvm.JvmSynthetic

public expect sealed class PlatformDriver(args: Args): SqlDriver {
Expand Down Expand Up @@ -55,12 +54,10 @@ public expect sealed class PlatformDriver(args: Args): SqlDriver {

protected companion object {

@JvmStatic
@JvmSynthetic
@Throws(IllegalArgumentException::class, IllegalStateException::class)
internal fun FactoryConfig.create(keyPragma: MutableMCPragmas, rekeyPragma: MutableMCPragmas?): Args

@JvmStatic
@JvmSynthetic
@Throws(IllegalStateException::class)
internal fun FactoryConfig.create(opt: EphemeralOpt): Args
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ package io.toxicity.sqlite.mc.driver.config
import app.cash.sqldelight.db.SqlCursor
import io.matthewnelson.immutable.collections.immutableSetOf
import io.matthewnelson.immutable.collections.toImmutableList
import io.matthewnelson.immutable.collections.toImmutableSet
import io.toxicity.sqlite.mc.driver.MCConfigDsl
import io.toxicity.sqlite.mc.driver.config.encryption.*
import io.toxicity.sqlite.mc.driver.internal.ext.buildMCConfigSQL
import kotlin.jvm.JvmField
import kotlin.jvm.JvmStatic
import kotlin.jvm.JvmSynthetic

public abstract class MCPragma<FieldType: Any> private constructor(
Expand Down Expand Up @@ -130,7 +128,6 @@ public abstract class MCPragma<FieldType: Any> private constructor(

internal companion object {

@JvmStatic
@get:JvmSynthetic
internal val ALL: Set<MCPragma<*>> by lazy {
immutableSetOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import io.toxicity.sqlite.mc.driver.config.MCPragma
import io.toxicity.sqlite.mc.driver.config.MutableMCPragmas
import io.toxicity.sqlite.mc.driver.internal.ext.appendColon
import kotlin.jvm.JvmField
import kotlin.jvm.JvmStatic
import kotlin.jvm.JvmSynthetic

public sealed class MCCipherConfig(
Expand Down Expand Up @@ -324,7 +323,6 @@ public sealed class MCCipherConfig(

protected companion object {

@JvmStatic
@Suppress("NOTHING_TO_INLINE")
@Throws(IllegalArgumentException::class)
internal inline fun Int.checkLegacyPageSize() {
Expand All @@ -337,7 +335,6 @@ public sealed class MCCipherConfig(
}
}

@JvmStatic
@Suppress("NOTHING_TO_INLINE")
@Throws(IllegalArgumentException::class)
internal inline fun Int.checkKdfIter() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ public actual sealed class PlatformDriver actual constructor(private val args: A

protected actual companion object {

@JvmStatic
@JvmSynthetic
@Throws(IllegalArgumentException::class, IllegalStateException::class)
internal actual fun FactoryConfig.create(keyPragma: MutableMCPragmas, rekeyPragma: MutableMCPragmas?): Args {
Expand Down Expand Up @@ -140,7 +139,6 @@ public actual sealed class PlatformDriver actual constructor(private val args: A
return Args(properties, driver, logger?.let { LogSqliteDriver(driver, it) })
}

@JvmStatic
@JvmSynthetic
@Throws(IllegalStateException::class)
internal actual fun FactoryConfig.create(opt: EphemeralOpt): Args {
Expand Down

0 comments on commit 270fc22

Please sign in to comment.