Groovy Documentation

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.


Field Summary
 
Fields inherited from class MainHandler
mExtension, mLogger, mModelManager, mProvider, mTaskManager
 
Constructor Summary
LibraryHandler(DependencyProvider provider)

Instantiates a new LibraryHandler.

 
Method Summary
protected VariantWrapper createVariantWrapper(BaseVariant variant)

Creates a new VariantWrapper instance special for LibraryVariants.

protected boolean isVariantInvalid(BaseVariant variant)

Checks if the variant is invalid.

 
Methods inherited from class MainHandler
createVariantWrapper, isVariantInvalid, run
 

Constructor Detail

LibraryHandler

LibraryHandler(DependencyProvider provider)
Instantiates a new LibraryHandler.
Parameters:
provider - The Dependency Provider for the plugin.


 
Method Detail

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