- Fix JENKINS-45714
- Added missing concerns for finding the
zipalign.execommand and Android SDK on Windows.
- Added missing concerns for finding the
- Properly override the build environment with the effective launched process environment so
the plugin can find
zipalignfrom a custom tool exportedPATHelement.
Enhancements
- Attempt to retrieve environment variables from a dummy process to find the
zipalignutility.
As a result, you can use the Custom Tools Plugin to install the Android SDK and exportANDROID_HOMEenvironment variable. This is necessary because the Custom Tool plugin only adds environment variables to launched processes for a build, e.g., an Execute shell build step. - Search the
PATHvariable for thezipalignutility and potential Android SDK installations. This suggestion comes from JENKINS-41787.
Minor bug fix/enhancement (JENKINS-44428)
- Use the credentials ID in the Key Store drop-down text if the credentials description is blank.
- Added more meaningful error log messages when things go wrong reading the key store.
- You can now leave the Key Alias field blank/null when your key store only has one key entry.
Minor bug fix (JENKINS-44299)
- The Sign Android APKs build step form validation now catches the
InterruptedExceptionthat occurs in the above issue, as well as validates all globs in a comma-separated multi-value of the APKs to Sign form field.
- Omit the
-signedcomponent of the output signed APKs for the Output to unsigned APK sibling/UnsignedApkSiblingMappingoption when the unsigned APK includes the-unsignedcomponent. This is to align with the intention of the change in the previous release to write signed APKs the same way the Android Gradle plugin does. Apologies for the excessive changes.
- Skip zipalign option - This is primarily to support signing debug APKs, for which the zipalign command fails. Choose this option in the advanced section of the config UI
- Signed APK output option - Signed APKs are now written to the directory of the input unsigned APK by default. Change this option in the advanced section of
the config UI.
- Previously saved Sign APKs steps of Freestyle jobs will output signed APKs as before to the
SignApksBuilder-outdirectory. - Pipeline scripts with
signAndroidApkssteps will write signed APKs in the new default manner. You can specify the old behavior like the this:
signAndroidApks ( // ... signedApkMapping: [$class: 'UnsignedApkBuilderDirMapping'] )
- Sign APKs steps previously or newly generated from a Job DSL plugin script will write signed APKs in the new default manner. You can specify the old behavior like this:
job('myAndroidApp.seed') { steps { signAndroidApks '**/*-unsigned.apk', { signedApkMapping { unsignedApkNameDir() } } } }
- Previously saved Sign APKs steps of Freestyle jobs will output signed APKs as before to the
- Updated Pipeline/Workflow dependency to 2.0
- Updated Android apksig dependency to 2.3.0 release
This release includes some significant changes:
- Config format change that is not backwards compatible
- The Sign APKs build step no longer accepts multiple APK signing entries. You must instead use multiple Sign APKs build steps. However, in most cases, if you are actually signing multiple APKs, the comma-separated globs in the APKs to Sign field should cover your needs with just one build step.
- When you install the new version of the plugin and restart Jenkins, the plugin will automatically upgrade any of your jobs that include Sign APKs build steps.
- Be aware that you cannot downgrade the plugin after upgrading and expect your Sign APKs build step configurations to remain intact.
- Jenkins Pipeline support - see the README
- Job DSL support - see the README
- As part of the the Pipeline support, the build step configuration form now offers parameters to override the
ANDROID_HOMElocation or the Zipalign Path (ANDROID_ZIPALIGNenvironment variable) directly. Access these fields by clicking the Advanced button at the top of the Sign APKs form group. Zipalign Path takes precedence overANDROID_HOME. If you don't supply either of these configuration parameters in the form, the plugin will still attempt to find them from the Jenkins system environment variables. - Build step form fields help on the configuration page
- The Archive Signed APKs option now defaults to checked/true
- Improved naming of output APKs
- The plugin will produce signed APKs relative to the job workspace at
SignApksBuilder-out/myApp-unsigned.apk/myApp-signed.apkin case you have downstream build steps that will manipulate the signed APK. - The plugin no longer assumes the input, unsigned APKs have a
-unsignedcomponent in the file name. If-unsignedis present, the plugin will replace it with-signed. Otherwise, the plugin will simply insert-signedbefore the.apksuffix.
- The plugin will produce signed APKs relative to the job workspace at
Minor bug fixes
- Try using
zipalign.exeifzipaligndoes not exist inANDROID_HOMEfor Windows case - Expand the zipalign path with EnvVars
This is the first release since the original plugin became unmaintained two years ago.
- Updated to use APK Signature Scheme v2
- Choices to archive the unsigned and signed APKs
- Auto-discover the zipalign command from
ANDROID_HOME, or override withANDROID_ZIPALIGN - Folder-scope-aware credentials lookup