Package proguard.io
Class D8BasedDexDataEntryWriter
java.lang.Object
proguard.io.DexDataEntryWriter
proguard.io.D8BasedDexDataEntryWriter
- All Implemented Interfaces:
AutoCloseable,DataEntryWriter
An dex writer that uses the d8 tool from the Android SDK.
-
Field Summary
Fields inherited from class proguard.io.DexDataEntryWriter
dexDataEntryWriter, dexFileName, otherDataEntryWriter -
Constructor Summary
ConstructorsConstructorDescriptionD8BasedDexDataEntryWriter(ClassPool classPool, StringMatcher classNameFilter, ClassPath libraryJars, String dexFileName, boolean forceDex, int minSdkVersion, boolean debuggable, DataEntryReader extraDexDataEntryVisitor, DataEntryWriter dexDataEntryWriter, DataEntryWriter otherDataEntryWriter) Creates a new D8BasedDexDataEntryWriter. -
Method Summary
Modifier and TypeMethodDescriptionprotected ClassVisitorvoidprintln(PrintWriter pw, String prefix) Prints out the structure of the data entry writer.protected voidwriteDex(OutputStream outputStream) Creates a new Dex instance from the collected classes.Methods inherited from class proguard.io.DexDataEntryWriter
close, createDirectory, createOutputStream, sameOutputStream
-
Constructor Details
-
D8BasedDexDataEntryWriter
public D8BasedDexDataEntryWriter(ClassPool classPool, StringMatcher classNameFilter, ClassPath libraryJars, String dexFileName, boolean forceDex, int minSdkVersion, boolean debuggable, DataEntryReader extraDexDataEntryVisitor, DataEntryWriter dexDataEntryWriter, DataEntryWriter otherDataEntryWriter) Creates a new D8BasedDexDataEntryWriter.- Parameters:
classPool- the class pool from which classes are collected.classNameFilter- an optional filter for classes to be written.dexFileName- the dex file name.forceDex- specifies whether the dex files should always be written, even if they don't contain any code.minSdkVersion- the minimum supported API level.debuggable- whether the dex file shall be debuggable or not.extraDexDataEntryVisitor- an optional extra visitor for all dex data entries that written. The visitor can use the data entry names, but must not read their contents.dexDataEntryWriter- the writer to which the converted dex file is written.otherDataEntryWriter- the writer to which other data entries are written.
-
-
Method Details
-
createClassConverter
-
writeDex
Description copied from class:DexDataEntryWriterCreates a new Dex instance from the collected classes.- Specified by:
writeDexin classDexDataEntryWriter- Throws:
IOException
-
println
Description copied from interface:DataEntryWriterPrints out the structure of the data entry writer.- Specified by:
printlnin interfaceDataEntryWriter- Overrides:
printlnin classDexDataEntryWriter- Parameters:
pw- the print stream to which the structure should be printed.prefix- a prefix for every printed line.
-