SpotiFlyer/buildSrc/src/main/kotlin/multiplatform-setup.gradle.kts

53 lines
1.5 KiB
Plaintext
Raw Normal View History

2021-03-06 18:33:05 +01:00
import gradle.kotlin.dsl.accessors._2e23d8fadf0ed92ae13e19db3d83f86d.compose
import gradle.kotlin.dsl.accessors._2e23d8fadf0ed92ae13e19db3d83f86d.kotlin
import gradle.kotlin.dsl.accessors._2e23d8fadf0ed92ae13e19db3d83f86d.sourceSets
import org.gradle.kotlin.dsl.withType
2021-01-26 13:54:28 +01:00
plugins {
id("com.android.library")
id("kotlin-multiplatform")
2021-03-06 18:33:05 +01:00
id("org.jetbrains.compose")
2021-01-26 13:54:28 +01:00
}
kotlin {
jvm("desktop")
android()
2021-03-05 20:50:24 +01:00
js {
browser()
nodejs()
}
2021-01-26 13:54:28 +01:00
sourceSets {
2021-03-06 18:33:05 +01:00
named("commonMain") {
2021-01-26 13:54:28 +01:00
dependencies {
2021-03-06 18:33:05 +01:00
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material)
2021-01-26 13:54:28 +01:00
}
}
2021-03-06 18:33:05 +01:00
named("androidMain") {
2021-01-26 13:54:28 +01:00
dependencies {
2021-03-06 18:33:05 +01:00
implementation("androidx.appcompat:appcompat:1.2.0")
implementation(Androidx.core)
2021-01-26 13:54:28 +01:00
}
}
2021-03-06 18:33:05 +01:00
named("desktopMain") {
2021-01-26 13:54:28 +01:00
dependencies {
2021-03-06 18:33:05 +01:00
implementation(compose.desktop.common)
2021-01-26 13:54:28 +01:00
}
}
2021-03-06 18:33:05 +01:00
named("jsMain") {
2021-03-05 20:50:24 +01:00
dependencies {
2021-03-06 18:33:05 +01:00
implementation("org.jetbrains:kotlin-react:17.0.1-pre.148-kotlin-1.4.30")
implementation("org.jetbrains:kotlin-styled:1.0.0-pre.115-kotlin-1.4.10")
implementation("org.jetbrains:kotlin-react-dom:17.0.1-pre.148-kotlin-1.4.30")
2021-03-05 20:50:24 +01:00
}
}
2021-01-26 13:54:28 +01:00
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
}