Class AndroidDependency

All Implemented Interfaces:
com.android.manifmerger.ManifestProvider

@Immutable public final class AndroidDependency extends ExtractedDependency
Represents an Android Library and its content.
  • Constructor Details

    • AndroidDependency

      public AndroidDependency(@Nullable File artifactFile, @NonNull com.android.builder.model.MavenCoordinates coordinates, @NonNull String name, @Nullable String projectPath, @NonNull File extractedFolder, @NonNull File jarsRootFolder, @Nullable String variant, boolean isSubModule)
  • Method Details

    • createExplodedAarLibrary

      public static AndroidDependency createExplodedAarLibrary(@NonNull File artifactFile, @NonNull com.android.builder.model.MavenCoordinates coordinates, @NonNull String name, @Nullable String projectPath, @NonNull File extractedFolder)
    • getArtifactFile

      @NonNull public File getArtifactFile()
      Description copied from class: Dependency
      Returns the artifact location.
      Overrides:
      getArtifactFile in class Dependency
    • isSubModule

      public boolean isSubModule()
      Returns whether the library is an android Lib sub-module. This is different from testing Dependency.getProjectPath() as a module could wrap a local aar, which is not the same as a lib sub-module.
    • getLocalJars

      @NonNull public List<File> getLocalJars()
      returns the list of local jar for this android AAR. This look on the file system for any jars under $AAR/lib
    • getJarFile

      @NonNull public File getJarFile()
      Description copied from class: ExtractedDependency
      Returns the location of the jar file to use for either packaging or compiling depending on the bundle type.
      Specified by:
      getJarFile in class ExtractedDependency
      Returns:
      a File for the jar file. The file may not point to an existing file.
    • getAdditionalClasspath

      @Nullable public List<File> getAdditionalClasspath()
      Specified by:
      getAdditionalClasspath in class Dependency
    • getJniFolder

      @NonNull public File getJniFolder()
    • getAidlFolder

      @NonNull public File getAidlFolder()
    • getRenderscriptFolder

      @NonNull public File getRenderscriptFolder()
    • getProguardRules

      @NonNull public File getProguardRules()
    • getLintJar

      @NonNull public File getLintJar()
    • getExternalAnnotations

      @NonNull public File getExternalAnnotations()
    • getPublicResources

      @NonNull public File getPublicResources()
    • getSymbolFile

      @NonNull public File getSymbolFile()
    • getJarsRootFolder

      @NonNull protected File getJarsRootFolder()
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class ExtractedDependency
    • toString

      public String toString()
      Overrides:
      toString in class Object