Oliver.O
09/05/2026, 7:17 PMCould not generate a decorated class for type MyPlugin
> com/android/build/api/variant/VariantBut the failure appeared only on GH CI (ubuntu-latest). Locally (also Ubuntu), it was always working. 🙄 Moving the code referencing AGP symbols out of my plugin class fixed it.
hfhbd
09/05/2026, 7:25 PMOliver.O
09/05/2026, 7:29 PMhfhbd
09/05/2026, 7:51 PMwithPlugin, so why do you expect the compile only class to be presented at runtime? 🤔Oliver.O
09/05/2026, 7:55 PMVariant class is not always present at run time, but only in projects which load AGP. I'm guarding the code accessing AGP symbols with a NoClassDefFoundError. That mechanism works, it just doesn't always survive Gradle's bytecode manipulation ("decoration").Oliver.O
09/05/2026, 8:20 PMwithPlugin reacts (lazily) to a plugin being applied. In this case, it's about a plugin (AGP) being present on the classpath.Adam S
09/06/2026, 2:35 PMOliver.O
09/06/2026, 2:37 PMOliver.O
09/06/2026, 8:28 PM