LibraryVariantBuilder

interface LibraryVariantBuilder : VariantBuilder, HasAndroidTestBuilder

VariantBuilder type for library projects

Summary

Inherited functions

Unit registerExtension(type: Class<out T>, instance: T)

Registers an extension object to the variant object. Extension objects can be looked up during the com.android.build.api.extension.AndroidComponentsExtension.onVariants callbacks by using the Variant.getExtension API.

This is very useful for third party plugins that want to attach some variant specific configuration object to the Android Gradle Plugin variant object and make it available to other plugins.

Inherited properties

Boolean androidTestEnabled

Set to true if the variant's has any android tests, false otherwise. Value is Boolean#True by default.

Boolean enableAndroidTest

Set to true if the variant's has any android tests, false otherwise. Value is Boolean#True by default.

Boolean enableUnitTest

Set to true if the variant's has any unit tests, false otherwise. Value is Boolean#True by default.

Int? maxSdk

Gets the maximum supported SDK Version for this variant.

Int? minSdk

Gets or sets the minimum supported SDK Version for this variant. Setting this it will override previous calls of minSdk and minSdkPreview setters. Only one of minSdk and minSdkPreview should be set.

String? minSdkPreview

Gets or sets the minimum supported SDK Version for this variant as a Preview codename. Setting this it will override previous calls of minSdk and minSdkPreview setters. Only one of minSdk and minSdkPreview should be set.

Int renderscriptTargetApi

Specifies the bytecode version to be generated. We recommend you set this value to the lowest API level able to provide all the functionality you are using

Int? targetSdk

Gets or sets the target SDK Version for this variant as a Preview codename. Setting this it will override previous calls of targetSdk and targetSdkPreview setters. Only one of targetSdk and targetSdkPreview should be set.

String? targetSdkPreview

Gets or sets the target SDK Version for this variant as a Preview codename. Setting this it will override previous calls of targetSdk and targetSdkPreview setters. Only one of targetSdk and targetSdkPreview should be set.

Boolean unitTestEnabled

Set to true if the variant's has any unit tests, false otherwise. Value is Boolean#True by default.