Skip to content

Commit 71d95d2

Browse files
committed
✨ AndroidComposeConventionPlugin에 application 모듈 지원 추가
1 parent 5323bd0 commit 71d95d2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

build-logic/convention/src/main/kotlin/com/twix/convention/AndroidComposeConventionPlugin.kt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.twix.convention
22

3+
import com.android.build.api.dsl.ApplicationExtension
34
import com.android.build.api.dsl.LibraryExtension
45
import com.twix.convention.extension.*
56
import org.gradle.kotlin.dsl.configure
@@ -8,8 +9,16 @@ import org.gradle.kotlin.dsl.dependencies
89
class AndroidComposeConventionPlugin : BuildLogicConventionPlugin({
910
applyPlugins("org.jetbrains.kotlin.plugin.compose")
1011

11-
extensions.configure<LibraryExtension> {
12-
configureCompose(this)
12+
pluginManager.withPlugin("com.android.application") {
13+
extensions.configure<ApplicationExtension> {
14+
configureCompose(this)
15+
}
16+
}
17+
18+
pluginManager.withPlugin("com.android.library") {
19+
extensions.configure<LibraryExtension> {
20+
configureCompose(this)
21+
}
1322
}
1423

1524
dependencies {

0 commit comments

Comments
 (0)