Class AaptStep

  • All Implemented Interfaces:

    public class AaptStep
    extends ShellStep
    Runs the Android Asset Packaging Tool (aapt), which creates an .apk file. Frequently, the pathsToRawFilesDirs excludes classes.dex, as classes.dex will be added separately to the final APK via ApkBuilder.
    • Constructor Detail

      • AaptStep

        public AaptStep​(SourcePathResolverAdapter pathResolver,
                        AndroidPlatformTarget androidPlatformTarget,
                        AbsPath workingDirectory,
                        Path androidManifest,
              <Path> resDirectories,
              <Path> assetsDirectories,
                        Path pathToOutputApkFile,
                        Path pathToRDotTxtDir,
                        Path pathToGeneratedProguardConfig,
              <Path> pathToDependecyResourceApks,
                        boolean isCrunchPngFiles,
                        boolean includesVectorDrawables,
                        ManifestEntries manifestEntries,
              <String> additionalAaptParams)
    • Method Detail

      • isSilentlyIgnored

        public static boolean isSilentlyIgnored​(Path path)
        Determines whether the default AAPT ignore pattern in DEFAULT_IGNORE_ASSETS_PATTERN would silently ignore a file.
        path - The path of the file we are interested in.
        Whether the file would be silently ignored.
      • getShellCommandInternal

        protected<String> getShellCommandInternal​(ExecutionContext context)
        Description copied from class: ShellStep
        Implementations of this method should not have any observable side-effects.
        Specified by:
        getShellCommandInternal in class ShellStep
      • getShortName

        public String getShortName()
        a short name/description for the command, such as "javac". Should fit on one line.