com.android.builder.model
Interface Variant


public interface Variant

A build Variant.


Method Summary
 java.lang.String getBuildType()
          Returns the build type.
 java.lang.String getDisplayName()
          Returns a display name for the variant.
 java.util.Collection<AndroidArtifact> getExtraAndroidArtifacts()
           
 java.util.Collection<JavaArtifact> getExtraJavaArtifacts()
           
 AndroidArtifact getMainArtifact()
          Returns the main artifact for this variant.
 ProductFlavor getMergedFlavor()
          The result of the merge of all the flavors and of the main default config.
 java.lang.String getName()
          Returns the name of the variant.
 java.util.List<java.lang.String> getProductFlavors()
          Returns the flavors for this variants.
 

Method Detail

getName

@NonNull
java.lang.String getName()
Returns the name of the variant. It is made up of the build type and flavors (if applicable)

Returns:
the name of the variant.

getDisplayName

@NonNull
java.lang.String getDisplayName()
Returns a display name for the variant. It is made up of the build type and flavors (if applicable)

Returns:
the name.

getMainArtifact

@NonNull
AndroidArtifact getMainArtifact()
Returns the main artifact for this variant.

Returns:
the artifact.

getExtraAndroidArtifacts

@NonNull
java.util.Collection<AndroidArtifact> getExtraAndroidArtifacts()

getExtraJavaArtifacts

@NonNull
java.util.Collection<JavaArtifact> getExtraJavaArtifacts()

getBuildType

@NonNull
java.lang.String getBuildType()
Returns the build type. All variants have a build type, so this is never null.

Returns:
the name of the build type.

getProductFlavors

@NonNull
java.util.List<java.lang.String> getProductFlavors()
Returns the flavors for this variants. This can be empty if no flavors are configured.

Returns:
a list of flavors which can be empty.

getMergedFlavor

@NonNull
ProductFlavor getMergedFlavor()
The result of the merge of all the flavors and of the main default config. If no flavors are defined then this is the same as the default config. This is directly a ProductFlavor instance of a ProdutFlavorContainer since this a composite of existing ProductFlavors.

Returns:
the merged flavors.
See Also:
AndroidProject.getDefaultConfig()