Package com.android.builder.packaging
Class JarFlinger
java.lang.Object
com.android.builder.packaging.JarFlinger
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDirectory(Path directory) voidaddDirectory(Path directory, Predicate<String> filterOverride, JarFlinger.Transformer transformer) voidaddDirectory(Path directory, Predicate<String> filterOverride, JarFlinger.Transformer transformer, JarFlinger.Relocator relocator) voidaddEntry(String entryPath, InputStream input) voidvoidaddJar(InputStream inputJar) voidvoidaddJar(Path path, Predicate<String> filterOverride, JarFlinger.Relocator relocator) A filter that keeps everything but ignores duplicate resources.voidclose()voidsetCompressionLevel(int compressionLevel)
-
Field Details
-
CLASSES_ONLY
-
EXCLUDE_CLASSES
-
-
Constructor Details
-
JarFlinger
- Throws:
IOException
-
JarFlinger
- Throws:
IOException
-
-
Method Details
-
allIgnoringDuplicateResources
A filter that keeps everything but ignores duplicate resources.Stateful, hence a factory method rather than an instance.
-
addDirectory
- Throws:
IOException
-
addDirectory
public void addDirectory(@NonNull Path directory, @Nullable Predicate<String> filterOverride, @Nullable JarFlinger.Transformer transformer) throws IOException - Throws:
IOException
-
addDirectory
public void addDirectory(@NonNull Path directory, @Nullable Predicate<String> filterOverride, @Nullable JarFlinger.Transformer transformer, @NonNull JarFlinger.Relocator relocator) throws IOException - Throws:
IOException
-
addJar
- Throws:
IOException
-
addJar
- Throws:
IOException
-
addJar
public void addJar(@NonNull Path path, @Nullable Predicate<String> filterOverride, @Nullable JarFlinger.Relocator relocator) throws IOException - Throws:
IOException
-
addFile
- Throws:
IOException
-
addEntry
- Throws:
IOException
-
setCompressionLevel
public void setCompressionLevel(int compressionLevel) -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-