public static class DefaultApkSignerEngine.Builder extends Object
DefaultApkSignerEngine
instances.Constructor and Description |
---|
Builder(List<DefaultApkSignerEngine.SignerConfig> signerConfigs,
int minSdkVersion)
Constructs a new
Builder . |
Modifier and Type | Method and Description |
---|---|
DefaultApkSignerEngine |
build()
Returns a new
DefaultApkSignerEngine instance configured based on the
configuration of this builder. |
DefaultApkSignerEngine.Builder |
setCreatedBy(String createdBy)
Sets the value of the
Created-By field in JAR signature files. |
DefaultApkSignerEngine.Builder |
setOtherSignersSignaturesPreserved(boolean preserved)
Sets whether signatures produced by signers other than the ones configured in this engine
should be copied from the input APK to the output APK.
|
DefaultApkSignerEngine.Builder |
setV1SigningEnabled(boolean enabled)
Sets whether the APK should be signed using JAR signing (aka v1 signature scheme).
|
DefaultApkSignerEngine.Builder |
setV2SigningEnabled(boolean enabled)
Sets whether the APK should be signed using APK Signature Scheme v2 (aka v2 signature
scheme).
|
public Builder(List<DefaultApkSignerEngine.SignerConfig> signerConfigs, int minSdkVersion)
Builder
.signerConfigs
- information about signers with which the APK will be signed. At
least one signer configuration must be provided.minSdkVersion
- API Level of the oldest Android platform on which the APK is
supposed to be installed. See minSdkVersion
attribute in the APK's
AndroidManifest.xml
. The higher the version, the stronger signing features
will be enabled.public DefaultApkSignerEngine build() throws InvalidKeyException
DefaultApkSignerEngine
instance configured based on the
configuration of this builder.InvalidKeyException
public DefaultApkSignerEngine.Builder setV1SigningEnabled(boolean enabled)
By default, the APK will be signed using this scheme.
public DefaultApkSignerEngine.Builder setV2SigningEnabled(boolean enabled)
By default, the APK will be signed using this scheme.
public DefaultApkSignerEngine.Builder setOtherSignersSignaturesPreserved(boolean preserved)
By default, signatures of other signers are omitted from the output APK.
public DefaultApkSignerEngine.Builder setCreatedBy(String createdBy)
Created-By
field in JAR signature files.Copyright © 2016. All rights reserved.