From c4708cbcab676f8cd94237c0352b32919faebc3d Mon Sep 17 00:00:00 2001 From: Carlos Martino Date: Mon, 22 Sep 2025 17:37:06 -0300 Subject: [PATCH] Initial commit --- .editorconfig | 1 + .../ComposeMultiplatformConventionPlugin.kt | 52 +++++++++---------- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/.editorconfig b/.editorconfig index f306e3c..726f881 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,6 +7,7 @@ ktlint_standard_multiline-expression-wrapping = disabled ktlint_standard_backing-property-naming = disabled ktlint_standard_function-naming = disabled ktlint_standard_chain-method-continuation = disabled +ktlint_standard_function-signature = disabled ktlint_chain_method_rule_force_multiline_when_chain_operator_count_greater_or_equal_than = 6 [**/build/**] diff --git a/buildlogic/convention/src/main/kotlin/ComposeMultiplatformConventionPlugin.kt b/buildlogic/convention/src/main/kotlin/ComposeMultiplatformConventionPlugin.kt index 6169e73..db357d2 100644 --- a/buildlogic/convention/src/main/kotlin/ComposeMultiplatformConventionPlugin.kt +++ b/buildlogic/convention/src/main/kotlin/ComposeMultiplatformConventionPlugin.kt @@ -2,43 +2,41 @@ 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 class ComposeMultiplatformConventionPlugin : Plugin { - override fun apply(target: Project) = - with(target) { - with(pluginManager) { - apply(libs.findPlugin("composeCompiler").get().get().pluginId) - apply(libs.findPlugin("composeMultiplatform").get().get().pluginId) - } + override fun apply(target: Project) = with(target) { + with(pluginManager) { + apply(libs.findPlugin("composeCompiler").get().get().pluginId) + apply(libs.findPlugin("composeMultiplatform").get().get().pluginId) + } - val composeDeps = extensions.getByType().dependencies + val composeDeps = extensions.getByType().dependencies - extensions.configure { - sourceSets.apply { - androidMain { - dependencies { - implementation(composeDeps.preview) - implementation(libs.findLibrary("libs.androidx.activity.compose").get()) - } + extensions.configure { + sourceSets.apply { + androidMain { + dependencies { + implementation(composeDeps.preview) + implementation(libs.findLibrary("libs.androidx.activity.compose").get()) } - commonMain { - dependencies { - implementation(composeDeps.runtime) - implementation(composeDeps.foundation) - implementation(composeDeps.material3) - implementation(composeDeps.ui) - implementation(composeDeps.uiUtil) - implementation(composeDeps.animation) - implementation(composeDeps.animationGraphics) - implementation(composeDeps.components.resources) - implementation(composeDeps.components.uiToolingPreview) - } + } + commonMain { + dependencies { + implementation(composeDeps.runtime) + implementation(composeDeps.foundation) + implementation(composeDeps.material3) + implementation(composeDeps.ui) + implementation(composeDeps.uiUtil) + implementation(composeDeps.animation) + implementation(composeDeps.animationGraphics) + implementation(composeDeps.components.resources) + implementation(composeDeps.components.uiToolingPreview) } } } } + } }