Skip to content

Instantly share code, notes, and snippets.

@landarskiy
Created November 15, 2022 12:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save landarskiy/b9020615269839868e8643720e97b426 to your computer and use it in GitHub Desktop.
Save landarskiy/b9020615269839868e8643720e97b426 to your computer and use it in GitHub Desktop.
internal fun Project.configureAndroidCompose(
commonExtension: CommonExtension<*, *, *, *>,
) {
val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
commonExtension.apply {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion =
libs.findVersion("androidxComposeCompiler").get().toString()
}
dependencies {
val bom = libs.findLibrary("androidx-compose-bom").get()
add("implementation", platform(bom))
add("androidTestImplementation", platform(bom))
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment