kezong / fat-aar-android

A gradle plugin that merge dependencies into the final aar file works with AGP 3.+

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plugin cannot be used if "com.android.tools.build:gradle" is not explicitly defined in root gradle file

mkopec87 opened this issue · comments

VariantProcessor explicitly checks buildscript dependencies to find android build tools version:

mProject.rootProject.buildscript.getConfigurations().getByName("classpath").getDependencies().each { Dependency dep ->

In my project, however, I don't define android build tools explicitly, but via a plugin.

It would be more robust to somehow search for android build tools dependency as a possibly transitive buildscript dependency.

I can see I have "com.android.tools.build:gradle" buildscript dependency, it's just not a top-level dependency, but a transitive one (I checked it via 'gradle buildEnvironment' task).