Class AaptStep

  • All Implemented Interfaces:
    Step

    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,
                        com.google.common.collect.ImmutableList<Path> resDirectories,
                        com.google.common.collect.ImmutableSortedSet<Path> assetsDirectories,
                        Path pathToOutputApkFile,
                        Path pathToRDotTxtDir,
                        Path pathToGeneratedProguardConfig,
                        com.google.common.collect.ImmutableList<Path> pathToDependecyResourceApks,
                        boolean isCrunchPngFiles,
                        boolean includesVectorDrawables,
                        ManifestEntries manifestEntries,
                        com.google.common.collect.ImmutableList<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.
        Parameters:
        path - The path of the file we are interested in.
        Returns:
        Whether the file would be silently ignored.
      • getShellCommandInternal

        protected com.google.common.collect.ImmutableList<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()
        Returns:
        a short name/description for the command, such as "javac". Should fit on one line.