Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-38731

Support uploading mappings to Google Play

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      There should be a way to automatically upload proguard mappings to Google Play console

        Attachments

          Activity

          Hide
          orrc Christopher Orr added a comment -

          As with all new features to the Google Play Developer Console, they didn't add API support.

          http://b.android.com/203432 is the bug on Android's side keeping track of this.

          Show
          orrc Christopher Orr added a comment - As with all new features to the Google Play Developer Console, they didn't add API support. http://b.android.com/203432 is the bug on Android's side keeping track of this.
          Hide
          cmarcelk Marcel Kinard added a comment -

          According to the Google bug referenced here, the Google API now has this feature. Also see https://developers.google.com/android-publisher/api-ref/edits/deobfuscationfiles

          Show
          cmarcelk Marcel Kinard added a comment - According to the Google bug referenced here, the Google API now has this feature. Also see https://developers.google.com/android-publisher/api-ref/edits/deobfuscationfiles
          Hide
          c_fry Christopher Frieler added a comment - - edited

          I'm using the google-play-android-publisher-plugin for my app as well and would be happy, if the plugin was able to upload the mapping.txt, too. I had a quick look at the code and might give it a try to provide a pull request, if I find the time in the next weeks.

          Christopher Orr, are pull requests still welcome? The plugin has not beed worked on for a while.

          Additionally, this is my first time to work on a jenkins plugin. Any hints or best practices about testing, debugging, etc. would be appreciated.

          Show
          c_fry Christopher Frieler added a comment - - edited I'm using the google-play-android-publisher-plugin for my app as well and would be happy, if the plugin was able to upload the mapping.txt, too. I had a quick look at the code and might give it a try to provide a pull request, if I find the time in the next weeks. Christopher Orr , are pull requests still welcome? The plugin has not beed worked on for a while. Additionally, this is my first time to work on a jenkins plugin. Any hints or best practices about testing, debugging, etc. would be appreciated.
          Hide
          orrc Christopher Orr added a comment -

          Christopher Frieler: Yeah, feel free to submit a PR.

          There are now some hints on the website, but at the most basic, you can check out the plugin and, with Maven installed, run `mvn hpi:run`: https://jenkins.io/doc/developer/tutorial/run/

          Show
          orrc Christopher Orr added a comment - Christopher Frieler : Yeah, feel free to submit a PR. There are now some hints on the website, but at the most basic, you can check out the plugin and, with Maven installed, run `mvn hpi:run`:  https://jenkins.io/doc/developer/tutorial/run/
          Hide
          c_fry Christopher Frieler added a comment - - edited

          Thanks, got it running. However, I came across the following challenge:

          The plugin supports to upload multiple apks, selected by a pattern. Usually each of these apks hast its own mapping-file. With just an additional pattern for the mapping-files the plugin couldn't know, which mapping benlongs to an apk.

          A very simple solution could be to allow upload of mappings only in case of a single apk. This would solve my current usecase, but would not work for those having a complex setup with multiple apks.

          As a better alternative the pattern for the mappings could be handled relative to the directory of each apk-file. This would fit for my usecase with only one apk, but also multi-module gradle-projects with severeal apk-modules, where each module produces a directory structure like this:

          • build/
            • outputs/
              • apk/
                • my_app.apk
              • mapping/
                • release/
                  • mapping.txt

          A valid mapping-file-pattern could then be "../mapping/*/mapping.txt". As far as I can see, this could handle both, projects with a single and multiple apks. Or are there any other project-setups, that you had in mind when you implemented support for multiple apks?

          Show
          c_fry Christopher Frieler added a comment - - edited Thanks, got it running. However, I came across the following challenge: The plugin supports to upload multiple apks, selected by a pattern. Usually each of these apks hast its own mapping-file. With just an additional pattern for the mapping-files the plugin couldn't know, which mapping benlongs to an apk. A very simple solution could be to allow upload of mappings only in case of a single apk. This would solve my current usecase, but would not work for those having a complex setup with multiple apks. As a better alternative the pattern for the mappings could be handled relative to the directory of each apk-file. This would fit for my usecase with only one apk, but also multi-module gradle-projects with severeal apk-modules, where each module produces a directory structure like this: build/ outputs/ apk/ my_app.apk mapping/ release/ mapping.txt A valid mapping-file-pattern could then be "../mapping/*/mapping.txt". As far as I can see, this could handle both, projects with a single and multiple apks. Or are there any other project-setups, that you had in mind when you implemented support for multiple apks?
          Hide
          c_fry Christopher Frieler added a comment -

          Added a PR that implements the second approach described above: https://github.com/jenkinsci/google-play-android-publisher-plugin/pull/4. Your feedback is welcome.

          Show
          c_fry Christopher Frieler added a comment - Added a PR that implements the second approach described above: https://github.com/jenkinsci/google-play-android-publisher-plugin/pull/4 . Your feedback is welcome.
          Hide
          c_fry Christopher Frieler added a comment -

          Christopher Orr, by now I have deployed my own snapshot-version of the plugin with my implementation included and it's working well. So it's tested and the issue is solved for me.

          However, I would be glad if you find the time to review my changes and merge them back. Should I move this issue to some other state? Don't know the workflow of this project.

          Show
          c_fry Christopher Frieler added a comment - Christopher Orr , by now I have deployed my own snapshot-version of the plugin with my implementation included and it's working well. So it's tested and the issue is solved for me. However, I would be glad if you find the time to review my changes and merge them back. Should I move this issue to some other state? Don't know the workflow of this project.
          Hide
          marjanovic Dragan Marjanovic added a comment -

          I would also love to use it on all our mobile projects.

          Show
          marjanovic Dragan Marjanovic added a comment - I would also love to use it on all our mobile projects.
          Hide
          orrc Christopher Orr added a comment -

          Yup, I'll take a look Real Soon Now (tm).

          Show
          orrc Christopher Orr added a comment - Yup, I'll take a look Real Soon Now (tm).
          Hide
          marjanovic Dragan Marjanovic added a comment - - edited

          Hi Christopher Orr, PR worked for me, what's the next step? I had to skip tests since it was failing (it was reporting 18 bugs not related to this PR changes but to the rest of the code):

          $ mvn install -DskipTests

          then I uploaded .hpi using Plugins/Advanced/Upload feature in Jenkins.
          I used basic scenario to upload mappings from job workspace root directory (**/mapping.txt worked also when in subdirectory).
          See screenshots below.

          Show
          marjanovic Dragan Marjanovic added a comment - - edited Hi Christopher Orr , PR worked for me, what's the next step? I had to skip tests since it was failing (it was reporting 18 bugs not related to this PR changes but to the rest of the code): $ mvn install -DskipTests then I uploaded .hpi using Plugins/Advanced/Upload feature in Jenkins. I used basic scenario to upload mappings from job workspace root directory (**/mapping.txt worked also when in subdirectory). See screenshots below.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christopher Frieler
          Path:
          pom.xml
          http://jenkins-ci.org/commit/google-play-android-publisher-plugin/7cdf0b230831e563bebd55a36cd3fe5f86c8563c
          Log:
          JENKINS-38731: Updated google-api-services-androidpublisher.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Frieler Path: pom.xml http://jenkins-ci.org/commit/google-play-android-publisher-plugin/7cdf0b230831e563bebd55a36cd3fe5f86c8563c Log: JENKINS-38731 : Updated google-api-services-androidpublisher.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christopher Frieler
          Path:
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkPublisher.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkUploadTask.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/Constants.java
          src/main/resources/org/jenkinsci/plugins/googleplayandroidpublisher/ApkPublisher/config.jelly
          src/main/resources/org/jenkinsci/plugins/googleplayandroidpublisher/ApkPublisher/help-deobfuscationFilesPattern.html
          http://jenkins-ci.org/commit/google-play-android-publisher-plugin/11b97cba9bc8bf78dd6342099fbdf945ca027406
          Log:
          JENKINS-38731: Added upload of deobfuscation-files.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Frieler Path: src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkPublisher.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkUploadTask.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/Constants.java src/main/resources/org/jenkinsci/plugins/googleplayandroidpublisher/ApkPublisher/config.jelly src/main/resources/org/jenkinsci/plugins/googleplayandroidpublisher/ApkPublisher/help-deobfuscationFilesPattern.html http://jenkins-ci.org/commit/google-play-android-publisher-plugin/11b97cba9bc8bf78dd6342099fbdf945ca027406 Log: JENKINS-38731 : Added upload of deobfuscation-files.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christopher Orr
          Path:
          Jenkinsfile
          pom.xml
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkPublisher.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkUploadTask.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/Constants.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/CredentialsHandler.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/EphemeralCredentialsException.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/GooglePlayBuildStepDescriptor.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ReleaseTrackAssignmentBuilder.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/TrackAssignmentTask.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/TrackPublisherTask.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/Util.java
          http://jenkins-ci.org/commit/google-play-android-publisher-plugin/a4c4faad6a2a15b294f6f963f60fb015914eb19d
          Log:
          Merge branch 'master' into feature/JENKINS-38731

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Orr Path: Jenkinsfile pom.xml src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkPublisher.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkUploadTask.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/Constants.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/CredentialsHandler.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/EphemeralCredentialsException.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/GooglePlayBuildStepDescriptor.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ReleaseTrackAssignmentBuilder.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/TrackAssignmentTask.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/TrackPublisherTask.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/Util.java http://jenkins-ci.org/commit/google-play-android-publisher-plugin/a4c4faad6a2a15b294f6f963f60fb015914eb19d Log: Merge branch 'master' into feature/ JENKINS-38731
          Hide
          orrc Christopher Orr added a comment -

          This is now included in version 1.6 of the plugin.

          Show
          orrc Christopher Orr added a comment - This is now included in version 1.6 of the plugin.
          Hide
          marjanovic Dragan Marjanovic added a comment - - edited

          It looks like mapping upload is broken on Google side (Publishing API) - file is uploaded correctly by Jenkins plugin (no error) but does not appear in Google Play Console anymore. Manual upload in Google Play Console still works. We noticed issue 2 days ago and last successful upload was 10 days ago. Has anyone else noticed the issue? Anyone knows where to report a Publishing API issue on Google side? Couldn't fine anything useful googling. Thanks! /cc Christopher Frieler

          Show
          marjanovic Dragan Marjanovic added a comment - - edited It looks like mapping upload is broken on Google side (Publishing API) - file is uploaded correctly by Jenkins plugin (no error) but does not appear in Google Play Console anymore. Manual upload in Google Play Console still works. We noticed issue 2 days ago and last successful upload was 10 days ago. Has anyone else noticed the issue? Anyone knows where to report a Publishing API issue on Google side? Couldn't fine anything useful googling. Thanks! /cc Christopher Frieler
          Hide
          orrc Christopher Orr added a comment -

          You should contact Google Play Developer Support by chat or email — it should be easy to find from the Developer Console.

          Show
          orrc Christopher Orr added a comment - You should contact Google Play Developer Support by chat or email — it should be easy to find from the Developer Console.
          Hide
          marjanovic Dragan Marjanovic added a comment -

          Ok, I contacted support via Google Play Console then follow up via email with all the details including API calls and responses in Publishing API. Hopefully they fix it soon.

          Show
          marjanovic Dragan Marjanovic added a comment - Ok, I contacted support via Google Play Console then follow up via email with all the details including API calls and responses in Publishing API. Hopefully they fix it soon.
          Hide
          marjanovic Dragan Marjanovic added a comment -

          Google has just confirmed the issue is fixed. I verified it works fine for me.

          Show
          marjanovic Dragan Marjanovic added a comment - Google has just confirmed the issue is fixed. I verified it works fine for me.

            People

            • Assignee:
              orrc Christopher Orr
              Reporter:
              aaverin Anton Averin
            • Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: