Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
[ID: 558956]
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
This is a feature request. I'm a maintainer at detekt . On our gradle plugin we want that if our users execute lint :
check
we just check the "default variant". We want to mimic the behavior ofOur problem is that there is not way from
gradle-api
to get the "default variant". The point where we read the active variants is:I would expect that
variant
should have adefault
property so we can identify which is the "default variant" but nothing like that exists.Android Studio also uses this concept of "default variant" on the "Build Variant" panel. AS displays all the possible variants of each module adding "(default)" to the default one.
So what we would like is an API at the
com.android.tools.build:gradle-api
level to know which is the default variant so we can create better integrations with the AGP.There are some workarounds for this but it forces you to depend on other project . It works but probably it's not bullet proof. At detekt we don't want to depend on
com.android.tools.build:gradle
instead ofcom.android.tools.build:gradle-api
I have it implemented oncom.android.tools.build:gradle
. We want just to depend oncom.android.tools.build:gradle-api
.