com.android.builder.model
Interface AndroidProject


public interface AndroidProject

Entry point for the model of the Android Projects. This models a single module, whether the module is an app project or a library project.


Field Summary
static java.lang.String ARTIFACT_INSTRUMENT_TEST
           
static java.lang.String ARTIFACT_MAIN
           
static java.lang.String BUILD_MODEL_ONLY_SYSTEM_PROPERTY
           
 
Method Summary
 AaptOptions getAaptOptions()
          Returns the aapt options.
 java.util.Collection<java.lang.String> getBootClasspath()
          Returns the boot classpath matching the compile target.
 java.util.Collection<BuildTypeContainer> getBuildTypes()
          Returns a list of all the BuildType in their container.
 java.lang.String getCompileTarget()
          Returns the compilation target as a string.
 ProductFlavorContainer getDefaultConfig()
          Returns the ProductFlavorContainer for the 'main' default config.
 java.util.Collection<ArtifactMetaData> getExtraArtifacts()
          Returns a list of extra artifacts meta data.
 java.util.Collection<java.io.File> getFrameworkSources()
          Returns a list of folders or jar files that contains the framework source code.
 JavaCompileOptions getJavaCompileOptions()
           
 LintOptions getLintOptions()
          Returns the lint options.
 java.lang.String getModelVersion()
          Returns the model version.
 java.lang.String getName()
          Returns the name of the module.
 java.util.Collection<ProductFlavorContainer> getProductFlavors()
          Returns a list of all the ProductFlavor in their container.
 java.util.Collection<SigningConfig> getSigningConfigs()
          Returns a list of SigningConfig.
 java.util.Collection<java.lang.String> getUnresolvedDependencies()
          Returns the dependencies that were not successfully resolved.
 java.util.Collection<Variant> getVariants()
          Returns a list of all the variants.
 boolean isLibrary()
          Returns whether this is a library.
 

Field Detail

BUILD_MODEL_ONLY_SYSTEM_PROPERTY

static final java.lang.String BUILD_MODEL_ONLY_SYSTEM_PROPERTY
See Also:
Constant Field Values

ARTIFACT_MAIN

static final java.lang.String ARTIFACT_MAIN
See Also:
Constant Field Values

ARTIFACT_INSTRUMENT_TEST

static final java.lang.String ARTIFACT_INSTRUMENT_TEST
See Also:
Constant Field Values
Method Detail

getModelVersion

@NonNull
java.lang.String getModelVersion()
Returns the model version. This is a string in the format X.Y.Z

Returns:
a string containing the model version.

getName

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

Returns:
the name of the module.

isLibrary

boolean isLibrary()
Returns whether this is a library.

Returns:
true for a library module.

getDefaultConfig

@NonNull
ProductFlavorContainer getDefaultConfig()
Returns the ProductFlavorContainer for the 'main' default config.

Returns:
the product flavor.

getBuildTypes

@NonNull
java.util.Collection<BuildTypeContainer> getBuildTypes()
Returns a list of all the BuildType in their container.

Returns:
a list of build type containers.

getProductFlavors

@NonNull
java.util.Collection<ProductFlavorContainer> getProductFlavors()
Returns a list of all the ProductFlavor in their container.

Returns:
a list of product flavor containers.

getVariants

@NonNull
java.util.Collection<Variant> getVariants()
Returns a list of all the variants. This does not include test variant. Test variants are additional artifacts in their respective variant info.

Returns:
a list of the variants.

getExtraArtifacts

@NonNull
java.util.Collection<ArtifactMetaData> getExtraArtifacts()
Returns a list of extra artifacts meta data. This does not include the main artifact.

Returns:
a list of extra artifacts

getCompileTarget

@NonNull
java.lang.String getCompileTarget()
Returns the compilation target as a string. This is the full extended target hash string. (see com.android.sdklib.IAndroidTarget#hashString())

Returns:
the target hash string

getBootClasspath

@NonNull
java.util.Collection<java.lang.String> getBootClasspath()
Returns the boot classpath matching the compile target. This is typically android.jar plus other optional libraries.

Returns:
a list of jar files.

getFrameworkSources

@NonNull
java.util.Collection<java.io.File> getFrameworkSources()
Returns a list of folders or jar files that contains the framework source code.

Returns:
a list of folders or jar files that contains the framework source code.

getSigningConfigs

@NonNull
java.util.Collection<SigningConfig> getSigningConfigs()
Returns a list of SigningConfig.

Returns:
a map of signing config

getAaptOptions

@NonNull
AaptOptions getAaptOptions()
Returns the aapt options.

Returns:
the aapt options.

getLintOptions

@NonNull
LintOptions getLintOptions()
Returns the lint options.

Returns:
the lint options.

getUnresolvedDependencies

@NonNull
java.util.Collection<java.lang.String> getUnresolvedDependencies()
Returns the dependencies that were not successfully resolved. The returned list gets populated only if the system property BUILD_MODEL_ONLY_SYSTEM_PROPERTY has been set to true.

Each value of the collection has the format group:name:version, for example: com.google.guava:guava:15.0.2

Returns:
the dependencies that were not successfully resolved.

getJavaCompileOptions

@NonNull
JavaCompileOptions getJavaCompileOptions()
Returns:
the compile options for Java code.