Android Gradle suggest change

Ignoring build variant

For some reasons you may want to ignore your build variants. For example: you have ‘mock’ product flavour and you use it only for debug purposes, such as unit/instrumentation tests.

Let’s ignore mockRelease variant from our project. Open build.gradle file and write:

// Remove mockRelease as it's not needed.
android.variantFilter { variant ->
    if (variant.buildType.name.equals('release') && variant.getFlavors().get(0).name.equals('mock')) {
        variant.setIgnore(true);
    }
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Table Of Contents
39 ACRA
64 Menu
112 Loader
119 Xposed
132 Colors
135 Fresco
140 AdMob
147 Button
156 Vk SDK
170 XMPP
176 OpenCV
200 FileIO
203 Moshi
217 Paint
231 AIDL
241 JCodec
243 Okio
255 Looper
  ↑ ↓ to navigate     ↵ to select     Esc to close