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(compose.foundation)
implementation(compose.material)
implementation(compose.runtime)
implementation(compose.ui)
implementation(Dependencies.AndroidX.appCompat)
implementation(Dependencies.AndroidX.browser)
implementation(Dependencies.AndroidX.datastore)

View file

@ -24,24 +24,24 @@ kotlin {
android()
sourceSets {
val androidMain by getting {
named("androidMain") {
dependencies {
implementation(Dependencies.AndroidX.browser)
}
}
val commonMain by getting {
named("commonMain") {
dependencies {
implementation(compose.runtime)
implementation(compose.ui)
api(compose.runtime)
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 {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))

View file

@ -1,23 +1,41 @@
import org.jetbrains.compose.compose
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
plugins {
kotlin("jvm")
kotlin("multiplatform")
id("org.jetbrains.compose") version Dependencies.JB_COMPOSE_VERSION
`lobsters-plugin`
}
repositories { maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
kotlin {
jvm {
withJava()
}
sourceSets {
named("jvmMain") {
dependencies {
implementation(compose.desktop.currentOs)
implementation(project(":api"))
implementation(project(":common"))
implementation(project(":database"))
implementation(compose.desktop.currentOs)
implementation(compose.runtime)
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"
}
}
}