com.android.builder.model
Interface ProductFlavor

All Superinterfaces:
BaseConfig

public interface ProductFlavor
extends BaseConfig

a Product Flavor. This is only the configuration of the flavor. It does not include the sources or the dependencies. Those are available on the container or in the artifact info.

See Also:
ProductFlavorContainer, BaseArtifact.getDependencies()

Method Summary
 int getMinSdkVersion()
          Returns the minSdkVersion.
 java.lang.String getName()
          Returns the name of the flavor.
 NdkConfig getNdkConfig()
          Returns the NDK configuration.
 java.lang.String getPackageName()
          Returns the name of the product flavor.
 boolean getRenderscriptNdkMode()
          Returns whether the renderscript code should be compiled to generate C/C++ bindings.
 boolean getRenderscriptSupportMode()
          Returns whether the renderscript code should be compiled in support mode to make it compatible with older versions of Android.
 int getRenderscriptTargetApi()
          Returns the renderscript target api.
 java.util.Collection<java.lang.String> getResourceConfigurations()
          Returns the resource configuration for this variant.
 int getTargetSdkVersion()
          Returns the targetSdkVersion.
 java.lang.Boolean getTestFunctionalTest()
          Returns the functionalTest value.
 java.lang.Boolean getTestHandleProfiling()
          Returns the handlingProfile value.
 java.lang.String getTestInstrumentationRunner()
          Returns the test package name.
 java.lang.String getTestPackageName()
          Returns the test package name.
 int getVersionCode()
          Returns the version code.
 java.lang.String getVersionName()
          Returns the version name.
 
Methods inherited from interface com.android.builder.model.BaseConfig
getBuildConfigFields, getConsumerProguardFiles, getProguardFiles
 

Method Detail

getName

@NonNull
java.lang.String getName()
Returns the name of the flavor.

Returns:
the name of the flavor.

getPackageName

@Nullable
java.lang.String getPackageName()
Returns the name of the product flavor. This is only the value set on this product flavor. To get the final package name, use AndroidArtifact.getPackageName().

Returns:
the package name.

getVersionCode

int getVersionCode()
Returns the version code. This is only the value set on this product flavor. To get the final value, use Variant.getMergedFlavor()

Returns:
the version code

getVersionName

@Nullable
java.lang.String getVersionName()
Returns the version name. This is only the value set on this product flavor. To get the final value, use Variant.getMergedFlavor() as well as BuildType.getVersionNameSuffix()

Returns:
the version name.

getMinSdkVersion

int getMinSdkVersion()
Returns the minSdkVersion. This is only the value set on this product flavor. TODO: make final minSdkVersion available through the model

Returns:
the minSdkVersion

getTargetSdkVersion

int getTargetSdkVersion()
Returns the targetSdkVersion. This is only the value set on this product flavor. TODO: make final targetSdkVersion available through the model

Returns:
the targetSdkVersion

getRenderscriptTargetApi

int getRenderscriptTargetApi()
Returns the renderscript target api. This is only the value set on this product flavor. TODO: make final renderscript target api available through the model

Returns:
the renderscript target api

getRenderscriptSupportMode

boolean getRenderscriptSupportMode()
Returns whether the renderscript code should be compiled in support mode to make it compatible with older versions of Android.

Returns:
true if support mode is enabled.

getRenderscriptNdkMode

boolean getRenderscriptNdkMode()
Returns whether the renderscript code should be compiled to generate C/C++ bindings.

Returns:
true for C/C++ generation, false for Java

getTestPackageName

@Nullable
java.lang.String getTestPackageName()
Returns the test package name. This is only the value set on this product flavor. To get the final value, use Variant#getTestArtifactInfo() and AndroidArtifact.getPackageName()

Returns:
the test package name.

getTestInstrumentationRunner

@Nullable
java.lang.String getTestInstrumentationRunner()
Returns the test package name. This is only the value set on this product flavor. TODO: make test instrumentation runner available through the model.

Returns:
the test package name.

getTestHandleProfiling

@Nullable
java.lang.Boolean getTestHandleProfiling()
Returns the handlingProfile value. This is only the value set on this product flavor.

Returns:
the handlingProfile value.

getTestFunctionalTest

@Nullable
java.lang.Boolean getTestFunctionalTest()
Returns the functionalTest value. This is only the value set on this product flavor.

Returns:
the functionalTest value.

getNdkConfig

@Nullable
NdkConfig getNdkConfig()
Returns the NDK configuration.

Returns:
the ndk config.

getResourceConfigurations

@NonNull
java.util.Collection<java.lang.String> getResourceConfigurations()
Returns the resource configuration for this variant. TODO implement this. This is the list of -c parameters for aapt.

Returns:
the resource configuration options.