Initial commit
This commit is contained in:
@@ -20,7 +20,7 @@ class ComposeMultiplatformConventionPlugin : Plugin<Project> {
|
||||
androidMain {
|
||||
dependencies {
|
||||
implementation(composeDeps.preview)
|
||||
implementation(libs.findLibrary("libs.androidx.activity.compose").get())
|
||||
implementation(libs.findLibrary("androidx.activity.compose").get())
|
||||
}
|
||||
}
|
||||
commonMain {
|
||||
|
||||
@@ -12,7 +12,6 @@ class KotlinMultiplatformConventionPlugin : Plugin<Project> {
|
||||
with(target) {
|
||||
with(pluginManager) {
|
||||
apply(libs.findPlugin("androidLibrary").get().get().pluginId)
|
||||
apply(libs.findPlugin("androidMultiplatform").get().get().pluginId)
|
||||
apply(libs.findPlugin("kotlinMultiplatform").get().get().pluginId)
|
||||
apply(libs.findPlugin("kotlinSerialization").get().get().pluginId)
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@ internal fun Project.configureKotlinAndroid(
|
||||
sourceSets["main"].resources.srcDirs("src/commonMain/composeResources")
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
}
|
||||
packaging {
|
||||
resources {
|
||||
|
||||
@@ -11,26 +11,36 @@ internal fun Project.configureKotlinMultiplatform(
|
||||
) = extension.apply {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
jvmToolchain(17)
|
||||
jvmToolchain(21)
|
||||
|
||||
androidTarget {
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_17)
|
||||
jvmTarget.set(JvmTarget.JVM_21)
|
||||
}
|
||||
}
|
||||
|
||||
listOf(iosArm64(), iosSimulatorArm64())
|
||||
listOf(iosArm64(), iosSimulatorArm64()).forEach { iosTarget ->
|
||||
iosTarget.binaries.framework {
|
||||
baseName = "shared"
|
||||
isStatic = true
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets.all {
|
||||
languageSettings {
|
||||
optIn("androidx.compose.material3.ExperimentalMaterial3Api")
|
||||
optIn("kotlin.time.ExperimentalTime")
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets.apply {
|
||||
commonMain {
|
||||
dependencies {
|
||||
implementation(libs.findLibrary("kotlinx.coroutines.core").get())
|
||||
api(libs.findLibrary("koin.core").get())
|
||||
}
|
||||
|
||||
androidMain {
|
||||
dependencies {
|
||||
implementation(libs.findLibrary("koin.android").get())
|
||||
implementation(libs.findLibrary("kotlinx.coroutines.android").get())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user