|
|
|
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
|
|
|
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
kotlin("multiplatform")
|
|
|
|
kotlin("plugin.compose")
|
|
|
|
id("com.android.library")
|
|
|
|
id("org.jetbrains.compose")
|
|
|
|
}
|
|
|
|
|
|
|
|
version = "1.0-SNAPSHOT"
|
|
|
|
|
|
|
|
kotlin {
|
|
|
|
androidTarget {
|
|
|
|
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
|
|
|
instrumentedTestVariant {
|
|
|
|
sourceSetTree.set(KotlinSourceSetTree.test)
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
// Remove the dependency on ui-test-junit4-android when 1.7.0 is released,
|
|
|
|
// as the needed classes in will have moved to ui-test
|
|
|
|
implementation("androidx.compose.ui:ui-test-junit4-android:1.6.0")
|
|
|
|
debugImplementation("androidx.compose.ui:ui-test-manifest")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
jvm("desktop")
|
|
|
|
|
|
|
|
listOf(
|
|
|
|
iosX64(),
|
|
|
|
iosArm64(),
|
|
|
|
iosSimulatorArm64()
|
|
|
|
).forEach { iosTarget ->
|
|
|
|
iosTarget.binaries.framework {
|
|
|
|
baseName = "shared"
|
|
|
|
isStatic = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
val commonMain by getting {
|
|
|
|
dependencies {
|
|
|
|
implementation(compose.runtime)
|
|
|
|
implementation(compose.foundation)
|
|
|
|
implementation(compose.material)
|
|
|
|
implementation(compose.materialIconsExtended)
|
|
|
|
implementation(compose.components.resources)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
val androidMain by getting {
|
|
|
|
dependencies {
|
|
|
|
api("androidx.activity:activity-compose:1.8.2")
|
|
|
|
api("androidx.appcompat:appcompat:1.6.1")
|
|
|
|
api("androidx.core:core-ktx:1.12.0")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
val desktopMain by getting {
|
|
|
|
dependencies {
|
|
|
|
implementation(compose.desktop.common)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
val desktopTest by getting {
|
|
|
|
dependencies {
|
|
|
|
implementation(compose.desktop.currentOs)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
val commonTest by getting {
|
|
|
|
dependencies {
|
|
|
|
implementation(kotlin("test"))
|
|
|
|
|
|
|
|
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
|
|
|
|
implementation(compose.uiTest)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdk = 35
|
|
|
|
namespace = "org.jetbrains.compose.demo.widgets.platform"
|
|
|
|
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
minSdk = 26
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
}
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
|
|
}
|
|
|
|
kotlin {
|
|
|
|
jvmToolchain(17)
|
|
|
|
}
|
|
|
|
}
|