com.android.builder.model
Interface AndroidLibrary

All Superinterfaces:
Library

public interface AndroidLibrary
extends Library

Represents an Android Library dependency, its content and its own dependencies


Method Summary
 java.io.File getAidlFolder()
          Returns the location of the aidl import folder.
 java.io.File getAssetsFolder()
          Returns the location of the assets folder.
 java.io.File getBundle()
          Returns the location of the library aar bundle.
 java.io.File getExternalAnnotations()
          Returns the location of the external annotations zip file (which may not exist)
 java.io.File getFolder()
          Returns the location of the unzipped bundle folder.
 java.io.File getJarFile()
          Returns the location of the jar file to use for packaging.
 java.io.File getJniFolder()
          Returns the location of the jni libraries folder.
 java.util.List<? extends AndroidLibrary> getLibraryDependencies()
          Returns the direct dependency of this dependency.
 java.io.File getLintJar()
          Returns the location of the lint jar.
 java.util.Collection<java.io.File> getLocalJars()
          Returns the list of local Jar files that are included in the dependency.
 java.io.File getManifest()
          Returns the location of the manifest.
 java.io.File getProguardRules()
          Returns the location of the proguard files.
 java.lang.String getProject()
          Returns an optional project identifier if the library is output by a module.
 java.lang.String getProjectVariant()
          Returns an optional configuration name if the library is output by a module that publishes more than one variant.
 java.io.File getPublicResources()
          Returns the location of an optional file that lists the only resources that should be considered public.
 java.io.File getRenderscriptFolder()
          Returns the location of the renderscript import folder.
 java.io.File getResFolder()
          Returns the location of the res folder.
 boolean isOptional()
          Returns whether the library is considered optional, meaning that it may or may not be present in the final APK.
 
Methods inherited from interface com.android.builder.model.Library
getRequestedCoordinates, getResolvedCoordinates
 

Method Detail

getProject

@Nullable
java.lang.String getProject()
Returns an optional project identifier if the library is output by a module.

Returns:
the project identifier

getProjectVariant

@Nullable
java.lang.String getProjectVariant()
Returns an optional configuration name if the library is output by a module that publishes more than one variant.


getBundle

@NonNull
java.io.File getBundle()
Returns the location of the library aar bundle.


getFolder

@NonNull
java.io.File getFolder()
Returns the location of the unzipped bundle folder.


getLibraryDependencies

@NonNull
java.util.List<? extends AndroidLibrary> getLibraryDependencies()
Returns the direct dependency of this dependency. The order is important.


getManifest

@NonNull
java.io.File getManifest()
Returns the location of the manifest.


getJarFile

@NonNull
java.io.File getJarFile()
Returns the location of the jar file to use for packaging.

Returns:
a File for the jar file. The file may not point to an existing file.

getLocalJars

@NonNull
java.util.Collection<java.io.File> getLocalJars()
Returns the list of local Jar files that are included in the dependency.

Returns:
a list of File. May be empty but not null.

getResFolder

@NonNull
java.io.File getResFolder()
Returns the location of the res folder.

Returns:
a File for the res folder. The file may not point to an existing folder.

getAssetsFolder

@NonNull
java.io.File getAssetsFolder()
Returns the location of the assets folder.

Returns:
a File for the assets folder. The file may not point to an existing folder.

getJniFolder

@NonNull
java.io.File getJniFolder()
Returns the location of the jni libraries folder.

Returns:
a File for the folder. The file may not point to an existing folder.

getAidlFolder

@NonNull
java.io.File getAidlFolder()
Returns the location of the aidl import folder.

Returns:
a File for the folder. The file may not point to an existing folder.

getRenderscriptFolder

@NonNull
java.io.File getRenderscriptFolder()
Returns the location of the renderscript import folder.

Returns:
a File for the folder. The file may not point to an existing folder.

getProguardRules

@NonNull
java.io.File getProguardRules()
Returns the location of the proguard files.

Returns:
a File for the file. The file may not point to an existing file.

getLintJar

@NonNull
java.io.File getLintJar()
Returns the location of the lint jar.

Returns:
a File for the jar file. The file may not point to an existing file.

getExternalAnnotations

@NonNull
java.io.File getExternalAnnotations()
Returns the location of the external annotations zip file (which may not exist)

Returns:
a File for the zip file. The file may not point to an existing file.

getPublicResources

@NonNull
java.io.File getPublicResources()
Returns the location of an optional file that lists the only resources that should be considered public.

Returns:
a File for the file. The file may not point to an existing file.

isOptional

boolean isOptional()
Returns whether the library is considered optional, meaning that it may or may not be present in the final APK. If the library is optional, then: - if the consumer is a library, it'll get skipped from resource merging and won't show up in the consumer R.txt - if the consumer is a separate test project, all the resources gets skipped from merging.