public class ZFiles
extends java.lang.Object
ZFiles that are specifically configured to be APKs, AARs, ...| Constructor and Description |
|---|
ZFiles() |
| Modifier and Type | Method and Description |
|---|---|
static ZFile |
apk(java.io.File f,
ZFileOptions options)
Creates a new zip file configured as an apk, based on a given file.
|
static ZFile |
apk(java.io.File f,
ZFileOptions options,
com.google.common.base.Optional<SigningOptions> signingOptions,
java.lang.String builtBy,
java.lang.String createdBy)
Deprecated.
|
static ZFile |
apk(java.io.File f,
ZFileOptions options,
com.google.common.base.Optional<SigningOptions> signingOptions,
java.lang.String builtBy,
java.lang.String createdBy,
boolean writeManifest)
Deprecated.
|
static ZFile |
apk(java.io.File f,
ZFileOptions options,
java.security.PrivateKey key,
com.google.common.collect.ImmutableList<java.security.cert.X509Certificate> certificates,
boolean v1SigningEnabled,
boolean v2SigningEnabled,
java.lang.String builtBy,
java.lang.String createdBy,
int minSdkVersion)
Deprecated.
Use constructor with
SigningOptions instead |
static ZFile |
apk(java.io.File f,
ZFileOptions options,
java.security.PrivateKey key,
java.security.cert.X509Certificate certificate,
boolean v1SigningEnabled,
boolean v2SigningEnabled,
java.lang.String builtBy,
java.lang.String createdBy,
int minSdkVersion)
Deprecated.
Use constructor with
SigningOptions instead |
public static ZFile apk(java.io.File f, ZFileOptions options) throws java.io.IOException
f - the file, if this path does not represent an existing path, will create a ZFile based on an non-existing path (a zip will be created when ZFile.close() is
invoked)options - the options to create the ZFilejava.io.IOException - failed to create the zip file@Deprecated public static ZFile apk(java.io.File f, ZFileOptions options, @Nullable java.security.PrivateKey key, @Nullable java.security.cert.X509Certificate certificate, boolean v1SigningEnabled, boolean v2SigningEnabled, @Nullable java.lang.String builtBy, @Nullable java.lang.String createdBy, int minSdkVersion) throws java.io.IOException
SigningOptions insteadf - the file, if this path does not represent an existing path, will create a ZFile based on an non-existing path (a zip will be created when ZFile.close() is
invoked)options - the options to create the ZFilekey - the PrivateKey used to sign the archive, or null.certificate - the X509Certificate used to sign the archive, or null.v1SigningEnabled - whether signing with JAR Signature Scheme (aka v1 signing) is enabled.v2SigningEnabled - whether signing with APK Signature Scheme v2 (aka v2 signing) is
enabled.builtBy - who to mark as builder in the manifestcreatedBy - who to mark as creator in the manifestminSdkVersion - minimum SDK version supportedjava.io.IOException - failed to create the zip file@Deprecated public static ZFile apk(java.io.File f, ZFileOptions options, @Nullable java.security.PrivateKey key, com.google.common.collect.ImmutableList<java.security.cert.X509Certificate> certificates, boolean v1SigningEnabled, boolean v2SigningEnabled, @Nullable java.lang.String builtBy, @Nullable java.lang.String createdBy, int minSdkVersion) throws java.io.IOException
SigningOptions insteadf - the file, if this path does not represent an existing path, will create a ZFile based on an non-existing path (a zip will be created when ZFile.close() is
invoked)options - the options to create the ZFilekey - the PrivateKey used to sign the archive, or null.certificates - list of the X509Certificates to embed in the signed APKs. The first
element of the list must be the certificate associated with the private key.v1SigningEnabled - whether signing with JAR Signature Scheme (aka v1 signing) is enabled.v2SigningEnabled - whether signing with APK Signature Scheme v2 (aka v2 signing) is
enabled.builtBy - who to mark as builder in the manifestcreatedBy - who to mark as creator in the manifestminSdkVersion - minimum SDK version supportedjava.io.IOException - failed to create the zip file@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) throws java.io.IOException
f - the file, if this path does not represent an existing path, will create a ZFile based on an non-existing path (a zip will be created when ZFile.close() is
invoked)options - the options to create the ZFilesigningOptions - the options to sign the apkbuiltBy - who to mark as builder in the manifestcreatedBy - who to mark as creator in the manifestjava.io.IOException - failed to create the zip file@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
f - the file, if this path does not represent an existing path, will create a ZFile based on an non-existing path (a zip will be created when ZFile.close() is
invoked)options - the options to create the ZFilesigningOptions - 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 defaultjava.io.IOException - failed to create the zip file