Eli Graber
09/03/2025, 4:17 PMwithPluginClasspath
when testing my plugin that interfaces with AGP, however AGP is a compileOnly
dependency in my project. I tried also adding it as a testImplementation
dependency, but I'm still getting errors like:
> Failed to apply plugin 'com.eygraber.release-tag-version-code'.
> Could not create plugin of type 'ReleaseTagVersionCodePlugin'.
> Could not generate a decorated class for type ReleaseTagVersionCodePlugin.
> com/android/build/gradle/AppPlugin
Changing the AGP dependency to implementation
makes the test work, but I'd prefer to keep compileOnly
. Any options?Eli Graber
09/03/2025, 4:20 PMtony
09/03/2025, 4:21 PMEli Graber
09/03/2025, 4:21 PMThomas Broyer
09/03/2025, 4:36 PMMartin
09/03/2025, 4:37 PMpublish to a dedicated local maven repo and make your test tasks depend on it
.
withPluginClasspath
is too different from real life conditionsThomas Broyer
09/03/2025, 4:42 PMThomas Broyer
09/03/2025, 4:43 PMtony
09/03/2025, 4:45 PMEli Graber
09/03/2025, 4:46 PMadditionalPluginClasspath
route, but for anything even slightly larger or more complicated I'd use your plugin. Thanks!tony
09/03/2025, 4:52 PMEli Graber
09/03/2025, 4:52 PM