Class ExtractedDependency

java.lang.Object
com.android.builder.dependency.level2.Dependency
com.android.builder.dependency.level2.ExtractedDependency
All Implemented Interfaces:
com.android.manifmerger.ManifestProvider
Direct Known Subclasses:
AndroidDependency

public abstract class ExtractedDependency extends Dependency implements com.android.manifmerger.ManifestProvider
Based implementation for all dependency types that need to extract its archive before usage.
  • Constructor Details

    • ExtractedDependency

      public ExtractedDependency(@Nullable File artifactFile, @NonNull com.android.builder.model.MavenCoordinates coordinates, @NonNull String name, @Nullable String projectPath, @NonNull File extractedFolder, @Nullable String variant)
      Creates the mBundle dependency with an optional mName.
      Parameters:
      artifactFile - the dependency's artifact file.
      coordinates - the maven coordinates of the artifact
      name - the dependency's user friendly name
      projectPath - an optional project path.
      extractedFolder - the folder containing the unarchived library content.
  • Method Details

    • getAddress

      @NonNull public Object getAddress()
      Returns a unique address that matches DependencyNode.getAddress().
      Overrides:
      getAddress in class Dependency
    • getExtractedFolder

      @NonNull public File getExtractedFolder()
    • getVariant

      @Nullable public String getVariant()
      Returns an optional configuration name if the library is output by a module that publishes more than one variant.
    • getManifest

      @NonNull public File getManifest()
      Specified by:
      getManifest in interface com.android.manifmerger.ManifestProvider
    • getResFolder

      @NonNull public File getResFolder()
    • getAssetsFolder

      @NonNull public File getAssetsFolder()
    • getJarFile

      @NonNull public abstract File getJarFile()
      Returns the location of the jar file to use for either packaging or compiling depending on the bundle type.
      Returns:
      a File for the jar file. The file may not point to an existing file.
    • getClasspathFile

      @NonNull public File getClasspathFile()
      Specified by:
      getClasspathFile in class Dependency
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Dependency
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Dependency