Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build-logic] 컴포즈 플러그인 공통 의존성 추가 #20

Merged
merged 3 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ dependencies {

gradlePlugin {
plugins {
register("androidCompose") {
id = "droidknights.android.compose"
implementationClass = "com.droidknights.app2023.ComposeAndroidPlugin"
}
register("androidHilt") {
id = "droidknights.android.hilt"
implementationClass = "com.droidknights.app2023.HiltAndroidPlugin"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.droidknights.app2023

import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies

Expand All @@ -14,19 +13,20 @@ internal fun Project.configureComposeAndroid() {
kotlinCompilerExtensionVersion =
libs.findVersion("androidxComposeCompiler").get().toString()
}

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

add("implementation", libs.findLibrary("androidx.compose.material3").get())
add("implementation", libs.findLibrary("androidx.compose.ui").get())
add("implementation", libs.findLibrary("androidx.compose.ui.tooling.preview").get())
add("androidTestImplementation", libs.findLibrary("androidx.test.ext").get())
add("androidTestImplementation", libs.findLibrary("androidx.test.espresso.core").get())
add("androidTestImplementation", libs.findLibrary("androidx.compose.ui.test").get())
add("debugImplementation", libs.findLibrary("androidx.compose.ui.tooling").get())
add("debugImplementation", libs.findLibrary("androidx.compose.ui.testManifest").get())
}
}
}

internal class ComposeAndroidPlugin : Plugin<Project> {

override fun apply(target: Project) {
with(target) {
configureComposeAndroid()
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import com.droidknights.app2023.configureComposeAndroid

configureComposeAndroid()
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import com.droidknights.app2023.configureComposeAndroid
import com.droidknights.app2023.configureHiltAndroid

plugins {
id("droidknights.android.library")
id("droidknights.android.compose")
}

configureHiltAndroid()
configureComposeAndroid()

dependencies {
implementation(project(":core:designsystem"))
Expand Down
12 changes: 0 additions & 12 deletions core/designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,3 @@ android {
namespace = "com.droidknights.app2023.core.designsystem"
}

dependencies {
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.tooling.preview)

androidTestImplementation(libs.androidx.test.ext)
androidTestImplementation(libs.androidx.test.espresso.core)
androidTestImplementation(libs.androidx.compose.ui.test)

debugImplementation(libs.androidx.compose.ui.tooling)
debugImplementation(libs.androidx.compose.ui.testManifest)
}