Make AGP and KGP deps compileOnly
Dependencies on other gradle plugins should be compileOnly dependencies, as it can accidentally impose the version paparazzi depends on rather than just use the one that the consuming project uses. For example – in our project, this transitive dep prevents us from testing newer AGP versions due to multiple versions appearing on the buildscript classpath.
Dependencies on other gradle plugins should be
compileOnlydependencies, as it can accidentally impose the version paparazzi depends on rather than just use the one that the consuming project uses. For example – in our project, this transitive dep prevents us from testing newer AGP versions due to multiple versions appearing on the buildscript classpath.
Is the newer plugin version check a new thing? We've definitely been able to pull in a newer AGP version on CashApp, with the risk of binary incompatibilities resulting in Paparazzi crashes, but that's different from your error message.
Re: the premise of compileOnly, I've previously attempted such (even consulting @autonomousapps given his success in having a test matrix in dependency-analysis-gradle-plugin), but @JakeWharton and I were of the opinion that it probably wasn't worth the maintenance burden, given AGP's dev cycle. Not opposed to it, if successful though.
accidentally hit "Close with comment", just meant to "Comment". My bad.
Is the newer plugin version check a new thing?
It's not a check, it's just how gradle and classloading work. It's a first-one-wins policy in many cases due to the hierarchical nature of gradle and generally just good plugin hygiene to not impose other plugin versions transitively. Things get tricky when you start assuming things about versions when a dependency appears sooner in that hierarchy (i.e. such as settings.gradle classpath) and later projects assume their dependency will win or be resolved with others.