Interface Library

All Known Subinterfaces:
AndroidBundle, AndroidLibrary, JavaLibrary

public interface Library
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns an optional build identifier.
    Returns a user friendly name.
    Returns an optional project identifier if the library is output by a module.
    com.android.builder.model.MavenCoordinates
    Returns this library's Maven coordinates, as requested in the build file.
    com.android.builder.model.MavenCoordinates
    Returns this library's Maven coordinates after all the project's dependencies have been resolved.
    boolean
    Returns whether the dependency is provided.
    boolean
    Returns whether the dependency is skipped.
  • Method Details

    • getBuildId

      @Nullable String getBuildId()
      Returns an optional build identifier.

      This is only valid if getProject() is not null. a null value in this property indicates that this is the root build.

      Returns:
      a build identifier or null.
    • getProject

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

      @Nullable String 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 than getRequestedCoordinates().
    • 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 always false since the provided dependencies are not present
      Returns:
      true if provided.