Skip to content

Commit

Permalink
feat/#7 : feature 컨밴션 생성
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwon12 committed Jan 10, 2025
1 parent 1422547 commit 3bee98f
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
35 changes: 35 additions & 0 deletions build-logic/src/main/java/com/yapp/app/ComposeAndroid.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package com.yapp.app

import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.getByType
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeCompilerGradlePluginExtension

internal fun Project.configureCompose() {
with(plugins) {
apply("org.jetbrains.kotlin.plugin.compose")
}

val libs = extensions.libs
androidExtension.apply {
dependencies {
val bom = libs.findLibrary("androidx-compose-bom").get()
add("implementation", platform(bom))
add("androidTestImplementation", platform(bom))

add("implementation", libs.findLibrary("androidx.material3").get())
add("implementation", libs.findLibrary("androidx.ui").get())
add("implementation", libs.findLibrary("androidx.ui.tooling.preview").get())
add("androidTestImplementation", libs.findLibrary("androidx.junit").get())
add("androidTestImplementation", libs.findLibrary("androidx.espresso.core").get())
add("androidTestImplementation", libs.findLibrary("androidx.ui.test.junit4").get())
add("debugImplementation", libs.findLibrary("androidx.ui.tooling").get())
add("debugImplementation", libs.findLibrary("androidx.ui.test.manifest").get())
}
}

extensions.getByType<ComposeCompilerGradlePluginExtension>().apply {
enableStrongSkippingMode.set(true)
includeSourceInformation.set(true)
}
}
4 changes: 4 additions & 0 deletions build-logic/src/main/java/yapp.android.compose.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import com.yapp.app.configureCompose


configureCompose()
20 changes: 20 additions & 0 deletions build-logic/src/main/java/yapp.android.feature.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
plugins {
id("yapp.android.library")
id("yapp.android.compose")
}

android {
packaging {
resources {
excludes.add("META-INF/**")
}
}
}

dependencies {
implementation(project(":core:ui"))
implementation(project(":core:designsystem"))
implementation(project(":core:model"))
implementation(project(":core:domain"))

}

0 comments on commit 3bee98f

Please sign in to comment.