Search in sources :

Example 1 with DexSplitStrategy

use of com.facebook.buck.dalvik.ZipSplitter.DexSplitStrategy in project buck by facebook.

the class AndroidBinaryDescription method createDexSplitMode.

private DexSplitMode createDexSplitMode(Arg args, EnumSet<ExopackageMode> exopackageModes) {
    // Exopackage builds default to JAR, otherwise, default to RAW.
    DexStore defaultDexStore = ExopackageMode.enabledForSecondaryDexes(exopackageModes) ? DexStore.JAR : DexStore.RAW;
    DexSplitStrategy dexSplitStrategy = args.minimizePrimaryDexSize ? DexSplitStrategy.MINIMIZE_PRIMARY_DEX_SIZE : DexSplitStrategy.MAXIMIZE_PRIMARY_DEX_SIZE;
    return new DexSplitMode(args.useSplitDex, dexSplitStrategy, args.dexCompression.orElse(defaultDexStore), args.linearAllocHardLimit.orElse(DEFAULT_LINEAR_ALLOC_HARD_LIMIT), args.primaryDexPatterns, args.primaryDexClassesFile, args.primaryDexScenarioFile, args.primaryDexScenarioOverflowAllowed, args.secondaryDexHeadClassesFile, args.secondaryDexTailClassesFile);
}
Also used : DexSplitStrategy(com.facebook.buck.dalvik.ZipSplitter.DexSplitStrategy)

Aggregations

DexSplitStrategy (com.facebook.buck.dalvik.ZipSplitter.DexSplitStrategy)1