Created
August 3, 2019 09:11
-
-
Save nhoxbypass/482290d243bfac0d5ac60ac5c135ca78 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def build_param = "${build}" | |
| if (build_param == "devCI") { | |
| // Exclude all except mockDebug flavor | |
| android.variantFilter { variant -> | |
| if (variant.getFlavors().get(0).name != 'mock' || variant.buildType.name != 'debug') { | |
| variant.setIgnore(true) | |
| } | |
| } | |
| } else if (build_param == "releaseCI") { | |
| // Exclude all except prodRelease flavor | |
| android.variantFilter { variant -> | |
| if (variant.getFlavors().get(0).name != 'prod' || variant.buildType.name != 'release') { | |
| variant.setIgnore(true) | |
| } | |
| } | |
| } else { | |
| // Normal local machine dev | |
| // Exclude mockRelease as it's not needed. | |
| android.variantFilter { variant -> | |
| if(variant.buildType.name == 'release' && variant.getFlavors().get(0).name == 'mock') { | |
| variant.setIgnore(true) | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment