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,
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)
Creates a new zip file configured as an apk, based on a given file.
|
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)
Creates a new zip file configured as an apk, based on a given file.
|
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 filepublic 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
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 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 filepublic 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
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 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