com.jcandksolutions.gradle.androidunittest
[Groovy] Class LibraryHandler
java.lang.Object
com.jcandksolutions.gradle.androidunittest.MainHandler
com.jcandksolutions.gradle.androidunittest.LibraryHandler
class LibraryHandler
extends MainHandler
Class that handles the extra configuration when the library plugin is applied.
LibraryHandler
LibraryHandler(DependencyProvider provider)
- Instantiates a new LibraryHandler.
- Parameters:
provider - The Dependency Provider for the plugin.
createVariantWrapper
@Override
protected VariantWrapper createVariantWrapper(BaseVariant variant)
- Creates a new VariantWrapper instance special for LibraryVariants.
- Returns:
- The wrapper.
- Parameters:
variant - The LibraryVariant to wrap.
isVariantInvalid
@Override
protected boolean isVariantInvalid(BaseVariant variant)
- Checks if the variant is invalid. For LibraryVariants, they are invalid if there is no
TestVariant associated to it. This is because the TestVariant is used to trigger the resources
merge by the android plugin which only the App plugin does naturally.
- Returns:
- true if no TestVariant available. false otherwise.
- Parameters:
baseVariant - The Variant to check.
Groovy Documentation