The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Google Play Android Publisher Plugin

androidApkUpload: Upload Android AAB/APKs to Google Play

  • apkFilesPattern (optional)
    • Type: String
  • deobfuscationFilesPattern (optional)
    Specifies filenames or patterns matching one or more ProGuard mapping files that should be uploaded to Google Play, so that it can automatically deobfuscate stacktraces from crash reports.

    You can use wildcards like "**/build/**/mapping.txt".
    See the 'includes' attribute of Ant's FileSet for the exact format.
    Note that multiple entries must be comma-separated.

    The base directory is the build's workspace. You can only upload mapping files that are located in your workspace.

    If there are multiple files being uploaded, and only one mapping.txt file is found, then this file will be associated with each of the files being uploaded. If there are multiple mapping.txt files, this plugin will make a basic attempt to associate each mapping file with the corresponding AAB/APK file.
    Otherwise, if the number of mapping files found is not equal to the number of APKs being uploaded, the build will fail, as this situation is not supported.

    For more information on deobfuscating crash stacktraces, see the Google Play documentation:
    https://support.google.com/googleplay/android-developer/answer/6295281 This field supports substituting environment variables in the form ${SOME_VARIABLE} or $SOME_VARIABLE at build time.
    • Type: String
  • expansionFilesPattern (optional)

    Specifies filenames or patterns matching zero or more expansion files that should be associated with the APK files being uploaded to Google Play.

    You can list as many or as few expansion files as you like — you have the option of associating previously-uploaded expansion files with the new APKs being uploading here.

    Naming

    Files must be named in the format [main|patch].<apk-version>.<application-id>.obb

    For example:
    • main.1000.com.example.mygame.obb
    • patch.1002.com.example.mygame.obb

    Patterns

    You can use wildcards like "**/build/**/*.obb".
    See the 'includes' attribute of Ant's FileSet for the exact format.
    Note that multiple entries must be comma-separated.

    The base directory is the build's workspace. You can only upload OBB files that are located in your workspace.

    Re-using existing expansion files

    If you don't provide a main or patch expansion file for every APK that you want to upload, enabling the "Re-use expansion files from existing APKs where necessary" option will automatically associate existing expansion file(s) with the APK(s) being uploaded.

    With this option enabled, if not enough expansion files are provided for all of the APK(s) being uploaded, this plugin will search for the newest, APKs on Google Play with main or patch expansion files — whether previously uploaded, or uploaded via the current build — and will associate those files with the new APK(s) being uploaded here.

    For example: If you want to upload a new APK, but the expansion files have not changed at all, you should leave the "Expansion files" field blank, but enable the checkbox.
    At build time, the latest existing main (and patch, if available) expansion files will be associated with the newly-uploaded APK.

    Similarly, if you have a new build, but only want to change the patch file, then just provide the patch expansion file and make sure this option is checked. The uploaded APK will have the existing main expansion file associated with it, along with the newly-uploaded patch file.

    Or, if you have a new main or patch expansion file, and want to apply that same file to multiple APKs being uploaded, name the expansion file according to the lowest versionCode that you're uploading. That expansion file will then be uploaded, and applied to the APKs with higher versionCodes that were uploaded in the same build. This field supports substituting environment variables in the form ${SOME_VARIABLE} or $SOME_VARIABLE at build time.
    • Type: String
  • filesPattern (optional)
    Specifies filenames or patterns matching one or more AABs or APKs that should be uploaded to Google Play.

    You can use wildcards like "**/build/outputs/*/*-release.apk".
    See the 'includes' attribute of Ant's FileSet for the exact format.
    Note that multiple entries must be comma-separated.

    The base directory is the build's workspace. You can only upload AAB or APK files that are located in your workspace.

    Applications which have several files per release, taking advantage of Multiple APK Support, must have all of their APKs uploaded together, and all APKs must have the same application identifier (APK package name).

    If no value is provided, the default is **/build/outputs/**/*.aab, **/build/outputs/**/*.apk. This field supports substituting environment variables in the form ${SOME_VARIABLE} or $SOME_VARIABLE at build time.
    • Type: String
  • googleCredentialsId (optional)
    Specifies which credential to use in order to connect to Google Play.

    The selected credential must be a "Google Service Account from private key" — if you have not added one already, refer to the documentation on this plugin's page.

    By choosing the "Parameter expression" option, you can also provide a credential at build time, either from an environment variable, or from a build parameter, e.g. the Credentials Parameter type.
    But you can use any type of expression, so long as it expands to the name of a "Google Service Account from private key" credential at build time. This field supports substituting environment variables in the form ${SOME_VARIABLE} at build time.
    Note that variables in the form $SOME_VARIABLE are not accepted by the Credentials Plugin.
    • Type: String
  • recentChangeList (optional)
    You can optionally apply "What's new" text to the uploaded file(s), in order to inform your user of changes contained in the new app version.

    You add entries for as many or as few of your supported language as you wish, but each language must already have been added to your app, under the "Store Listing" section in the Google Play Developer Console.

    The language must match the language code shown in the Developer Console, e.g. "en-GB" for British English, or "ar" for Arabic.

    The text may be between zero and 500 characters.

    For more information on describing what's new in your app, see the Google Play documentation:
    https://support.google.com/googleplay/android-developer/answer/189724 Both fields support substituting environment variables in the form ${SOME_VARIABLE} or $SOME_VARIABLE at build time.
      Array/List
      Nested Object
    • language
      • Type: String
    • text
      • Type: String
  • rolloutPercent (optional)
    The percentage of users in the given track to which the uploaded file(s) should be rolled out.

    If you enter no value here, or 100%, the app will be rolled out to all users.

    For more information on staged rollouts, see the Google Play documentation:
    https://support.google.com/googleplay/android-developer/answer/3131213 This field supports substituting environment variables in the form ${SOME_VARIABLE} or $SOME_VARIABLE at build time.
    • Type: double
  • rolloutPercentage (optional)
    • Type: String
  • trackName (optional)
    The release track to which the given file(s) will be assigned.

    This can be one of:
    • internal
    • alpha
    • beta
    • production
    For each release track, you have the choice of rolling your new version out to all existing users simultaneously, or doing a staged rollout so that only a fraction of your existing userbase will be able to download the new version.

    For more information on internal, alpha and beta testing, or staged rollouts, see the Google Play documentation:
    https://support.google.com/googleplay/android-developer/answer/3131213 This field supports substituting environment variables in the form ${SOME_VARIABLE} or $SOME_VARIABLE at build time.
    • Type: String
  • usePreviousExpansionFilesIfMissing (optional)
    • Type: boolean

androidApkMove: Move Android apps to a different release track

If you have already uploaded files to Google Play, whether manually, via the "Upload Android AAB/APK to Google Play" post-build action, or by other means, this build step allows you to change the release track for specific versions.

For example, you can use this to promote an app currently in alpha testing to the beta release track, once you've decided it's ready for a wider audience.

Similarly, once you're ready for release, you can move from beta to a staged rollout, or directly to production.

Note that "downgrading" release tracks, e.g. from production to alpha is not possible.
  • apkFilesPattern (optional)
    • Type: String
  • applicationId (optional)
    Application ID (i.e. APK package name) of the app being assigned to a new release track. This field supports substituting environment variables in the form ${SOME_VARIABLE} or $SOME_VARIABLE at build time.
    • Type: String
  • filesPattern (optional)
    Specifies filenames or patterns matching one or more AAB or APK files from which the version codes should be read, in order to determine which app versions should be re-assigned to a new release track.

    Note that these files should have already been uploaded — this build step will not do any uploading; it will only move existing app versions from one release track to another. To upload app files, use the "Upload Android AAB/APK to Google Play" post-build action.

    You can use wildcards like "**/build/outputs/*/*-release.apk".
    See the 'includes' attribute of Ant's FileSet for the exact format.
    Note that multiple entries must be comma-separated.

    The base directory is the build's workspace. You can only reference AAB or APK files that are located in your workspace.

    If no value is provided, the default is **/build/outputs/**/*.aab, **/build/outputs/**/*.apk. This field supports substituting environment variables in the form ${SOME_VARIABLE} or $SOME_VARIABLE at build time.
    • Type: String
  • fromVersionCode (optional)
    • Type: boolean
  • googleCredentialsId (optional)
    Specifies which credential to use in order to connect to Google Play.

    The selected credential must be a "Google Service Account from private key" — if you have not added one already, refer to the documentation on this plugin's page.

    By choosing the "Parameter expression" option, you can also provide a credential at build time, either from an environment variable, or from a build parameter, e.g. the Credentials Parameter type.
    But you can use any type of expression, so long as it expands to the name of a "Google Service Account from private key" credential at build time. This field supports substituting environment variables in the form ${SOME_VARIABLE} at build time.
    Note that variables in the form $SOME_VARIABLE are not accepted by the Credentials Plugin.
    • Type: String
  • rolloutPercent (optional)
    The percentage of users in the given track to which the uploaded file(s) should be rolled out.

    If you enter no value here, or 100%, the app will be rolled out to all users.

    For more information on staged rollouts, see the Google Play documentation:
    https://support.google.com/googleplay/android-developer/answer/3131213 This field supports substituting environment variables in the form ${SOME_VARIABLE} or $SOME_VARIABLE at build time.
    • Type: double
  • rolloutPercentage (optional)
    • Type: String
  • trackName (optional)
    The release track to which the given file(s) will be re-assigned.

    This can be one of:
    • internal
    • alpha
    • beta
    • production
    For each release track, you have the choice of rolling the version(s) out to all existing users simultaneously, or doing a staged rollout so that only a fraction of your existing userbase will be able to download the new version.

    For more information on internal, alpha and beta testing, or staged rollouts, see the Google Play documentation:
    https://support.google.com/googleplay/android-developer/answer/3131213 This field supports substituting environment variables in the form ${SOME_VARIABLE} or $SOME_VARIABLE at build time.
    • Type: String
  • versionCodes (optional)
    This specifies which version codes should be assigned to a new release track.
    Note that multiple entries must be comma-separated. This field supports substituting environment variables in the form ${SOME_VARIABLE} or $SOME_VARIABLE at build time.
    • Type: String

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.