public static class ApkCreatorFactory.CreationData
extends java.lang.Object
ApkCreatorFactory.make(CreationData).| Constructor and Description |
|---|
CreationData(java.io.File apkPath,
java.security.PrivateKey key,
java.security.cert.X509Certificate certificate,
boolean v1SigningEnabled,
boolean v2SigningEnabled,
java.lang.String builtBy,
java.lang.String createdBy,
int minSdkVersion,
NativeLibrariesPackagingMode nativeLibrariesPackagingMode,
java.util.function.Predicate<java.lang.String> noCompressPredicate) |
| Modifier and Type | Method and Description |
|---|---|
java.io.File |
getApkPath()
Obtains the path where the APK should be located.
|
java.lang.String |
getBuiltBy()
Obtains the "built-by" text for the APK.
|
java.security.cert.X509Certificate |
getCertificate()
Obtains the certificate used to sign the APK.
|
java.lang.String |
getCreatedBy()
Obtains the "created-by" text for the APK.
|
int |
getMinSdkVersion()
Obtains the minimum SDK version to run the APK.
|
NativeLibrariesPackagingMode |
getNativeLibrariesPackagingMode()
Returns the packaging policy that the
ApkCreator should use for native libraries. |
java.util.function.Predicate<java.lang.String> |
getNoCompressPredicate()
Returns the predicate to decide which file paths should be uncompressed.
|
java.security.PrivateKey |
getPrivateKey()
Obtains the private key used to sign the APK.
|
boolean |
isV1SigningEnabled()
Returns
true if this APK should be signed with JAR Signature Scheme (aka v1
scheme). |
boolean |
isV2SigningEnabled()
Returns
true if this APK should be signed with APK Signature Scheme v2 (aka v2
scheme). |
public CreationData(@Nonnull
java.io.File apkPath,
@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,
@Nonnull
NativeLibrariesPackagingMode nativeLibrariesPackagingMode,
@Nonnull
java.util.function.Predicate<java.lang.String> noCompressPredicate)
apkPath - the path where the APK should be located. May already exist or not (if it
does, then the APK may be updated instead of created)key - key used to sign the APK. May be nullcertificate - certificate used to sign the APK. Is null if and only if
key is nullv1SigningEnabled - true if this APK should be signed with JAR Signature
Scheme (aka v1 scheme).v2SigningEnabled - true if this APK should be signed with APK Signature
Scheme v2 (aka v2 scheme).builtBy - built-by information for the APK, if any; if null then the default
should be usedcreatedBy - created-by information for the APK, if any; if null then the
default should be usedminSdkVersion - minimum SDK version that will run the APKnativeLibrariesPackagingMode - packaging mode for native librariesnoCompressPredicate - predicate to decide which file paths should be uncompressed;
returns true for files that should not be compressed@Nonnull public java.io.File getApkPath()
@Nullable public java.security.PrivateKey getPrivateKey()
null if the APK should not be signed@Nullable public java.security.cert.X509Certificate getCertificate()
null if the APK should not be signed; this will return
null if and only if getPrivateKey() returns nullpublic boolean isV1SigningEnabled()
true if this APK should be signed with JAR Signature Scheme (aka v1
scheme).public boolean isV2SigningEnabled()
true if this APK should be signed with APK Signature Scheme v2 (aka v2
scheme).@Nullable public java.lang.String getBuiltBy()
null if the default should be used@Nullable public java.lang.String getCreatedBy()
null if the default should be usedpublic int getMinSdkVersion()
@Nonnull public NativeLibrariesPackagingMode getNativeLibrariesPackagingMode()
ApkCreator should use for native libraries.@Nonnull public java.util.function.Predicate<java.lang.String> getNoCompressPredicate()