all: reorganize dependencies and improve desktop packaging

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Harsh Shandilya 2021-04-09 18:35:35 +00:00 committed by GitHub
parent 388014d62b
commit 4a51dc8d64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 37 additions and 21 deletions

View file

@ -26,8 +26,6 @@ dependencies {
implementation(project(":database")) implementation(project(":database"))
implementation(compose.foundation) implementation(compose.foundation)
implementation(compose.material) implementation(compose.material)
implementation(compose.runtime)
implementation(compose.ui)
implementation(Dependencies.AndroidX.appCompat) implementation(Dependencies.AndroidX.appCompat)
implementation(Dependencies.AndroidX.browser) implementation(Dependencies.AndroidX.browser)
implementation(Dependencies.AndroidX.datastore) implementation(Dependencies.AndroidX.datastore)

View file

@ -24,24 +24,24 @@ kotlin {
android() android()
sourceSets { sourceSets {
val androidMain by getting { named("androidMain") {
dependencies { dependencies {
implementation(Dependencies.AndroidX.browser) implementation(Dependencies.AndroidX.browser)
} }
} }
val commonMain by getting { named("commonMain") {
dependencies { dependencies {
implementation(compose.runtime) api(compose.runtime)
implementation(compose.ui) api(compose.ui)
} }
} }
val androidTest by getting { dependencies { implementation(kotlin("test-junit")) } } named("androidTest") { dependencies { implementation(kotlin("test-junit")) } }
val jvmTest by getting { dependencies { implementation(kotlin("test-junit")) } } named("jvmTest") { dependencies { implementation(kotlin("test-junit")) } }
val commonTest by getting { named("commonTest") {
dependencies { dependencies {
implementation(kotlin("test-common")) implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common")) implementation(kotlin("test-annotations-common"))

View file

@ -1,23 +1,41 @@
import org.jetbrains.compose.compose import org.jetbrains.compose.compose
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
plugins { plugins {
kotlin("jvm") kotlin("multiplatform")
id("org.jetbrains.compose") version Dependencies.JB_COMPOSE_VERSION id("org.jetbrains.compose") version Dependencies.JB_COMPOSE_VERSION
`lobsters-plugin` `lobsters-plugin`
} }
repositories { maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") } repositories { maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
dependencies { kotlin {
implementation(project(":api")) jvm {
implementation(project(":common")) withJava()
implementation(project(":database")) }
implementation(compose.desktop.currentOs) sourceSets {
implementation(compose.runtime) named("jvmMain") {
implementation(compose.material) dependencies {
implementation(Dependencies.Kotlin.Coroutines.jvmCore) implementation(compose.desktop.currentOs)
implementation(Dependencies.ThirdParty.kamel) implementation(project(":api"))
implementation(Dependencies.ThirdParty.Retrofit.moshi) implementation(project(":common"))
implementation(project(":database"))
implementation(compose.material)
implementation(Dependencies.Kotlin.Coroutines.jvmCore)
implementation(Dependencies.ThirdParty.kamel)
implementation(Dependencies.ThirdParty.Retrofit.moshi)
}
}
}
} }
compose.desktop { application { mainClass = "dev.msfjarvis.lobsters.ui.Main" } } compose.desktop {
application {
mainClass = "dev.msfjarvis.lobsters.ui.Main"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "Claw"
packageVersion = "1.0.0"
}
}
}