diff --git a/build.gradle.kts b/build.gradle.kts index 122aea9..82d367b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,6 @@ plugins { // in each subproject's classloader alias(libs.plugins.androidApplication) apply false alias(libs.plugins.androidLibrary) apply false - alias(libs.plugins.kotlinMultiplatform) apply false alias(libs.plugins.kotlinAndroid) apply false alias(libs.plugins.kotlinJvm) apply false } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b0b4f17..4810a32 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -25,7 +25,6 @@ compose-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-mani compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" } compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" } coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" } -coroutines-swing = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-swing", version.ref = "coroutines" } cryptography-bigint = { group = "dev.whyoleg.cryptography", name = "cryptography-bigint", version.ref = "cryptography" } kotlin-test = { group = "org.jetbrains.kotlin", name = "kotlin-test", version.ref = "kotlin" } ktor-client-cio = { group = "io.ktor", name = "ktor-client-cio", version.ref = "ktor" } @@ -38,6 +37,5 @@ voyager-screenmodel = { group = "cafe.adriel.voyager", name = "voyager-screenmod [plugins] androidApplication = { id = "com.android.application", version.ref = "agp" } androidLibrary = { id = "com.android.library", version.ref = "agp" } -kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } diff --git a/library/crypto/build.gradle.kts b/library/crypto/build.gradle.kts new file mode 100644 index 0000000..e199814 --- /dev/null +++ b/library/crypto/build.gradle.kts @@ -0,0 +1,9 @@ +plugins { + alias(libs.plugins.kotlinJvm) +} + +dependencies { + implementation(libs.cryptography.bigint) + + testImplementation(libs.kotlin.test) +} diff --git a/shared/crypto/src/commonMain/kotlin/net/agorise/shared/crypto/Crc32.kt b/library/crypto/src/main/kotlin/net/agorise/shared/crypto/Crc32.kt similarity index 100% rename from shared/crypto/src/commonMain/kotlin/net/agorise/shared/crypto/Crc32.kt rename to library/crypto/src/main/kotlin/net/agorise/shared/crypto/Crc32.kt diff --git a/shared/crypto/src/commonTest/kotlin/net/agorise/shared/crypto/Crc32Test.kt b/library/crypto/src/test/kotlin/net/agorise/shared/crypto/Crc32Test.kt similarity index 100% rename from shared/crypto/src/commonTest/kotlin/net/agorise/shared/crypto/Crc32Test.kt rename to library/crypto/src/test/kotlin/net/agorise/shared/crypto/Crc32Test.kt diff --git a/library/stargate/build.gradle.kts b/library/stargate/build.gradle.kts index 46909b0..103b826 100644 --- a/library/stargate/build.gradle.kts +++ b/library/stargate/build.gradle.kts @@ -3,8 +3,9 @@ plugins { } dependencies { - implementation(projects.shared.crypto) + implementation(projects.library.crypto) + implementation(libs.coroutines.core) implementation(libs.cryptography.bigint) implementation(libs.ktor.client.cio) implementation(libs.ktor.client.core) diff --git a/settings.gradle.kts b/settings.gradle.kts index 9477365..3ce0aee 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -19,6 +19,6 @@ dependencyResolutionManagement { } include(":app") -include(":shared:crypto") +include(":library:crypto") include(":library:preferences") include(":library:stargate") diff --git a/shared/crypto/build.gradle.kts b/shared/crypto/build.gradle.kts deleted file mode 100644 index 7a742e3..0000000 --- a/shared/crypto/build.gradle.kts +++ /dev/null @@ -1,44 +0,0 @@ -plugins { - alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidLibrary) -} - -kotlin { - androidTarget { - compilations.all { - kotlinOptions { - jvmTarget = "11" - } - } - } - - jvm() - - iosX64() - iosArm64() - iosSimulatorArm64() - - sourceSets { - commonMain.dependencies { - implementation(libs.cryptography.bigint) - } - - commonTest.dependencies { - implementation(libs.kotlin.test) - } - } -} - -android { - namespace = "net.agorise.shared.crypto" - compileSdk = libs.versions.android.compileSdk.get().toInt() - - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 - } -}