Francesc
09/28/2024, 11:02 PMFrancesc
09/28/2024, 11:02 PMtoml
file
[plugins]
com-android-compose-screenshot = { id = "com.android.compose.screenshot", version.ref = "com-android-compose-screenshot-version"}
and I'm trying to apply the plugin like so
class AndroidLibraryComposeConventionPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
pluginManager.apply("com.android.library")
pluginManager.apply("kotlin-parcelize")
// plugin applied here
val plugin = catalog.findPlugin("com.android.compose.screenshot").get().get()
pluginManager.apply(plugin.pluginId)
val extension = extensions.getByType<LibraryExtension>()
configureAndroidCompose(extension)
}
}
}
Francesc
09/28/2024, 11:03 PM* What went wrong:
An exception occurred applying plugin request [id: 'weathersample.android.library.compose']
> Failed to apply plugin 'weathersample.android.library.compose'.
> Plugin with id 'com.android.compose.screenshot' not found.
ephemient
09/28/2024, 11:31 PM[plugins] com-android-compose-screenshot
is in the consumer projectFrancesc
09/29/2024, 5:50 AMVampire
09/29/2024, 11:46 AMFrancesc
09/29/2024, 4:05 PMbuild.gradle
file, I have these in there
dependencies {
compileOnly(libs.com.android.tools.build.gradle)
compileOnly(libs.org.jetbrains.kotlin.kotlin.gradle.plugin)
compileOnly(libs.io.gitlab.arturbosch.detekt)
}
so I may need to add a dependency for the screenshot plugin as well?Francesc
09/29/2024, 4:10 PMcom-android-compose-screenshot-plugin = { module = "com.android.compose.screenshot:com.android.compose.screenshot.gradle.plugin", version.ref = "com-android-compose-screenshot-version" }
in the toml
file and
dependencies {
compileOnly(libs.com.android.tools.build.gradle)
compileOnly(libs.org.jetbrains.kotlin.kotlin.gradle.plugin)
compileOnly(libs.io.gitlab.arturbosch.detekt)
compileOnly(libs.com.android.compose.screenshot.plugin)
}
in the build.gradle but still no diceephemient
09/29/2024, 4:12 PMFrancesc
09/29/2024, 4:13 PMtoml
fileFrancesc
09/29/2024, 4:13 PMVampire
09/29/2024, 4:14 PMcompileOnly
in your plugin build, that does not change anything.
You do not use any classes, but only apply by id, so compileOnly
of course does not make any difference.Vampire
09/29/2024, 4:14 PMVampire
09/29/2024, 4:15 PMVampire
09/29/2024, 4:15 PMVampire
09/29/2024, 4:16 PMFrancesc
09/29/2024, 4:16 PMVampire
09/29/2024, 4:16 PMFrancesc
09/29/2024, 4:16 PMVampire
09/29/2024, 4:16 PMVampire
09/29/2024, 4:17 PMVampire
09/29/2024, 4:17 PMimplementation
dependency on the plugin to your plugin build and you are fineFrancesc
09/29/2024, 4:17 PMVampire
09/29/2024, 4:18 PMVampire
09/29/2024, 4:18 PMFrancesc
09/29/2024, 4:18 PMVampire
09/29/2024, 4:18 PMVampire
09/29/2024, 4:19 PMFrancesc
09/29/2024, 4:19 PMcompileOnly
to implementation
?Vampire
09/29/2024, 4:19 PMFrancesc
09/29/2024, 4:20 PMVampire
09/29/2024, 4:20 PMFrancesc
09/29/2024, 4:20 PMVampire
09/29/2024, 4:20 PM