public class DalvikAwareZipSplitter extends Object implements ZipSplitter
ZipSplitter
that uses estimates from DalvikStatsTool
to
determine how many classes to pack into a dex.
It does three passes through the .class files:
requiredInPrimaryZip
predicate to filter the set
of classes that must be included in the primary dex. These classes are added to
the primary zip.
wantedInPrimaryZip
list to find classes that
were not included in the first pass but that should still be in the primary zip for
performance reasons, and adds them to the primary zip.
ZipSplitter.DexSplitStrategy
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableMultimap<APKModule,Path> |
execute()
Writes the primary zip file and if necessary, the secondary zip files.
|
static DalvikAwareZipSplitter |
splitZip(ProjectFilesystem filesystem,
Set<Path> inFiles,
Path outPrimary,
Path outSecondaryDir,
String secondaryPattern,
Path outDexStoresDir,
long linearAllocLimit,
java.util.function.Predicate<String> requiredInPrimaryZip,
Set<String> wantedInPrimaryZip,
com.google.common.collect.ImmutableSet<String> secondaryHeadSet,
com.google.common.collect.ImmutableSet<String> secondaryTailSet,
com.google.common.collect.ImmutableMultimap<APKModule,String> additionalDexStoreSets,
APKModule rootAPKModule,
ZipSplitter.DexSplitStrategy dexSplitStrategy,
Path reportDir) |
public static DalvikAwareZipSplitter splitZip(ProjectFilesystem filesystem, Set<Path> inFiles, Path outPrimary, Path outSecondaryDir, String secondaryPattern, Path outDexStoresDir, long linearAllocLimit, java.util.function.Predicate<String> requiredInPrimaryZip, Set<String> wantedInPrimaryZip, com.google.common.collect.ImmutableSet<String> secondaryHeadSet, com.google.common.collect.ImmutableSet<String> secondaryTailSet, com.google.common.collect.ImmutableMultimap<APKModule,String> additionalDexStoreSets, APKModule rootAPKModule, ZipSplitter.DexSplitStrategy dexSplitStrategy, Path reportDir)
public com.google.common.collect.ImmutableMultimap<APKModule,Path> execute() throws IOException
ZipSplitter
execute
in interface ZipSplitter
IOException