-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
110 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
build-logic/convention/src/main/kotlin/plugins/AndroidApplicationComposePlugin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package plugins | ||
|
||
import com.android.build.api.dsl.ApplicationExtension | ||
import ext.androidTestImplementation | ||
import ext.debugImplementation | ||
import ext.getBundle | ||
import ext.getLibrary | ||
import ext.getVersionCatalog | ||
import ext.implementation | ||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.gradle.api.artifacts.VersionCatalogsExtension | ||
import org.gradle.kotlin.dsl.dependencies | ||
import org.gradle.kotlin.dsl.getByType | ||
|
||
/** | ||
* Android Application 모듈에 compose를 사용할 경우 적용할 Plugin | ||
* | ||
* plugin id : [yello.android.application.compose] | ||
*/ | ||
class AndroidApplicationComposePlugin : Plugin<Project> { | ||
override fun apply(target: Project) { | ||
with(target) { | ||
extensions.getByType<ApplicationExtension>().apply { | ||
buildFeatures { | ||
compose = true | ||
} | ||
|
||
composeOptions { | ||
kotlinCompilerExtensionVersion = "1.5.11" | ||
} | ||
} | ||
val libs = extensions.getVersionCatalog() | ||
dependencies { | ||
val composeBom = platform(libs.getLibrary("compose-bom")) | ||
implementation(composeBom) | ||
androidTestImplementation(composeBom) | ||
implementation(libs.getBundle("compose-bom-bundle")) | ||
debugImplementation(libs.getLibrary("compose-bom-debug-ui-tooling")) | ||
androidTestImplementation(libs.getLibrary("compose-bom-debug-ui-test-manifest")) | ||
implementation(libs.getBundle("compose")) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters