Improvements
try to make it run on Android (still unsuccessful)
This commit is contained in:
@@ -1,59 +1,57 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm {
|
||||
tasks.withType<KotlinJvmCompile>().configureEach {
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_17)
|
||||
}
|
||||
}
|
||||
}
|
||||
jvmToolchain(libs.versions.jdk.get().toInt())
|
||||
|
||||
androidTarget {
|
||||
tasks.withType<KotlinJvmCompile>().configureEach {
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_11)
|
||||
}
|
||||
}
|
||||
jvm("desktop")
|
||||
androidTarget()
|
||||
|
||||
android.apply {
|
||||
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
||||
namespace = "ch.dissem.yaep.common.ui"
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
}
|
||||
}
|
||||
// @OptIn(ExperimentalWasmDsl::class)
|
||||
// wasmJs {
|
||||
// moduleName = "yaep-commonUI"
|
||||
// browser()
|
||||
// binaries.executable()
|
||||
// }
|
||||
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
api(projects.domain)
|
||||
val androidMain by getting
|
||||
val commonTest by getting
|
||||
|
||||
implementation(compose.components.resources)
|
||||
implementation(compose.runtime)
|
||||
implementation(compose.foundation)
|
||||
implementation(compose.material3)
|
||||
implementation(compose.ui)
|
||||
implementation(compose.components.uiToolingPreview)
|
||||
commonMain.dependencies {
|
||||
api(projects.domain)
|
||||
|
||||
implementation(compose.components.resources)
|
||||
implementation(compose.runtime)
|
||||
implementation(compose.foundation)
|
||||
implementation(compose.material3)
|
||||
implementation(compose.ui)
|
||||
implementation(compose.components.uiToolingPreview)
|
||||
// implementation(libs.compose.ui.text.googlefonts)
|
||||
}
|
||||
|
||||
implementation(libs.logging)
|
||||
}
|
||||
val commonTest by getting {
|
||||
dependencies {
|
||||
implementation(libs.kotlin.test)
|
||||
implementation(libs.atrium)
|
||||
}
|
||||
androidMain.dependencies {
|
||||
implementation(libs.androidx.compose.foundation)
|
||||
}
|
||||
|
||||
commonTest.dependencies {
|
||||
implementation(libs.kotlin.test)
|
||||
implementation(libs.atrium)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
||||
namespace = "ch.dissem.yaep.common.ui"
|
||||
|
||||
buildFeatures {
|
||||
compose = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user