Class ZFiles
- java.lang.Object
-
- com.android.tools.build.apkzlib.zfile.ZFiles
-
public class ZFiles extends java.lang.ObjectFactory forZFiles that are specifically configured to be APKs, AARs, ...
-
-
Constructor Summary
Constructors Constructor Description ZFiles()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ZFileapk(java.io.File f, ZFileOptions options)Creates a new zip file configured as an apk, based on a given file.static ZFileapk(java.io.File f, ZFileOptions options, com.google.common.base.Optional<SigningOptions> signingOptions, java.lang.String builtBy, java.lang.String createdBy)Creates a new zip file configured as an apk, based on a given file.static ZFileapk(java.io.File f, ZFileOptions options, com.google.common.base.Optional<SigningOptions> signingOptions, java.lang.String builtBy, java.lang.String createdBy, boolean writeManifest)Deprecated.
-
-
-
Method Detail
-
apk
public static ZFile apk(java.io.File f, ZFileOptions options) throws java.io.IOException
Creates a new zip file configured as an apk, based on a given file.- Parameters:
f- the file, if this path does not represent an existing path, will create aZFilebased on an non-existing path (a zip will be created whenZFile.close()is invoked)options- the options to create theZFile- Returns:
- the zip file
- Throws:
java.io.IOException- failed to create the zip file
-
apk
public static ZFile apk(java.io.File f, ZFileOptions options, com.google.common.base.Optional<SigningOptions> signingOptions, @Nullable java.lang.String builtBy, @Nullable java.lang.String createdBy) throws java.io.IOException
Creates a new zip file configured as an apk, based on a given file.- Parameters:
f- the file, if this path does not represent an existing path, will create aZFilebased on an non-existing path (a zip will be created whenZFile.close()is invoked)options- the options to create theZFilesigningOptions- the options to sign the apkbuiltBy- who to mark as builder in the manifestcreatedBy- who to mark as creator in the manifest- Returns:
- the zip file
- Throws:
java.io.IOException- failed to create the zip file
-
apk
@Deprecated public static ZFile apk(java.io.File f, ZFileOptions options, com.google.common.base.Optional<SigningOptions> signingOptions, @Nullable java.lang.String builtBy, @Nullable java.lang.String createdBy, boolean writeManifest) throws java.io.IOException
Deprecated.Creates a new zip file configured as an apk, based on a given file.- Parameters:
f- the file, if this path does not represent an existing path, will create aZFilebased on an non-existing path (a zip will be created whenZFile.close()is invoked)options- the options to create theZFilesigningOptions- the options to sign the apkbuiltBy- who to mark as builder in the manifestcreatedBy- who to mark as creator in the manifestwriteManifest- a migration parameter that forces keeping (useless) manifest.mf file in apk file in order to prevent breaking changes. Clients of the previous interface will still get apk with manifest.mf because the flag is true by default- Returns:
- the zip file
- Throws:
java.io.IOException- failed to create the zip file
-
-