Initial commit
This commit is contained in:
@@ -2,6 +2,7 @@ import dev.carlosmartino.plugins.libs
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
import org.gradle.kotlin.dsl.dependencies
|
||||
import org.gradle.kotlin.dsl.getByType
|
||||
import org.jetbrains.compose.ComposeExtension
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
|
||||
@@ -18,6 +19,12 @@ class ComposeMultiplatformConventionPlugin : Plugin<Project> {
|
||||
|
||||
extensions.configure<KotlinMultiplatformExtension> {
|
||||
sourceSets.apply {
|
||||
androidMain {
|
||||
dependencies {
|
||||
implementation(composeDeps.preview)
|
||||
implementation(libs.findLibrary("libs.androidx.activity.compose").get())
|
||||
}
|
||||
}
|
||||
commonMain {
|
||||
dependencies {
|
||||
implementation(composeDeps.runtime)
|
||||
@@ -28,9 +35,13 @@ class ComposeMultiplatformConventionPlugin : Plugin<Project> {
|
||||
implementation(composeDeps.animation)
|
||||
implementation(composeDeps.animationGraphics)
|
||||
implementation(composeDeps.components.resources)
|
||||
implementation(composeDeps.components.uiToolingPreview)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ internal fun Project.configureKotlinAndroid(
|
||||
extension: LibraryExtension,
|
||||
) = extension.apply {
|
||||
val moduleName = path.split(":").drop(2).joinToString(".")
|
||||
namespace = if (moduleName.isNotEmpty()) "dev.carlosmartino.platform.$moduleName" else "dev.carlosmartino.platform"
|
||||
namespace = if (moduleName.isNotEmpty()) "dev.carlosmartino.$moduleName" else "dev.carlosmartino.platform"
|
||||
|
||||
compileSdk = libs
|
||||
.findVersion("android.compileSdk")
|
||||
|
||||
Reference in New Issue
Block a user