Class RepackZipEntriesStep

  • All Implemented Interfaces:
    Step

    public class RepackZipEntriesStep
    extends Object
    implements Step
    A command that creates a copy of a ZIP archive, making sure that certain user-specified entries are packed with a certain compression level.

    Can be used, for instance, to force the resources.arsc file in an Android .apk to be compressed.

    • Constructor Detail

      • RepackZipEntriesStep

        public RepackZipEntriesStep​(ProjectFilesystem filesystem,
                                    Path inputPath,
                                    Path outputPath,
                                    com.google.common.collect.ImmutableSet<String> entries)
        Creates a RepackZipEntriesStep. A temporary directory will be created and used to extract entries. Entries will be packed with the maximum compression level.
        Parameters:
        inputPath - input archive
        outputPath - destination archive
        entries - files to repack (e.g. ImmutableSet.of("resources.arsc"))
      • RepackZipEntriesStep

        public RepackZipEntriesStep​(ProjectFilesystem filesystem,
                                    Path inputPath,
                                    Path outputPath,
                                    com.google.common.collect.ImmutableSet<String> entries,
                                    ZipCompressionLevel compressionLevel)
        Parameters:
        inputPath - input archive
        outputPath - destination archive
        entries - files to repack (e.g. ImmutableSet.of("resources.arsc"))
        compressionLevel - the level of compression to use