Package com.android.builder.model
Interface Library
- All Known Subinterfaces:
AndroidBundle,AndroidLibrary,JavaLibrary
public interface Library
-
Method Summary
Modifier and TypeMethodDescriptionReturns an optional build identifier.getName()Returns a user friendly name.Returns an optional project identifier if the library is output by a module.com.android.builder.model.MavenCoordinatesReturns this library's Maven coordinates, as requested in the build file.com.android.builder.model.MavenCoordinatesReturns this library's Maven coordinates after all the project's dependencies have been resolved.booleanReturns whether the dependency is provided.booleanReturns whether the dependency is skipped.
-
Method Details
-
getBuildId
Returns an optional build identifier.This is only valid if
getProject()is notnull. anullvalue in this property indicates that this is the root build.- Returns:
- a build identifier or null.
-
getProject
Returns an optional project identifier if the library is output by a module.- Returns:
- the project identifier
-
getName
Returns a user friendly name. -
getRequestedCoordinates
@Nullable com.android.builder.model.MavenCoordinates getRequestedCoordinates()Returns this library's Maven coordinates, as requested in the build file. -
getResolvedCoordinates
@NonNull com.android.builder.model.MavenCoordinates getResolvedCoordinates()Returns this library's Maven coordinates after all the project's dependencies have been resolved. This coordinate may be different thangetRequestedCoordinates(). -
isSkipped
boolean isSkipped()Returns whether the dependency is skipped. This can happen in testing artifacts when the same dependency is present in both the tested artifact and the test artifact.- Returns:
- true if skipped.
-
isProvided
boolean isProvided()Returns whether the dependency is provided. This is only valid for dependencies present in the 'compile' graph. In the 'package' graph the value is alwaysfalsesince the provided dependencies are not present- Returns:
- true if provided.
-