After setting up the plugin. I can't clean my workspace.
      After restarting Jenkins It works again, a new build and I have the same problem again.

      [WS-CLEANUP] Deleting project workspace...Cannot delete workspace :Unable to delete 'C:\Users\magre\.jenkins\workspace\App_Club_Release\app\build\outputs\apk\okccnl-1.1.10-release.apk'. Tried 3 times (of a maximum of 3) waiting 0,1 sec between attempts.
      ERROR: Step ‘Delete workspace when build is done’ failed: Cannot delete workspace: Unable to delete 'C:\Users\magre\.jenkins\workspace\App_Club_Release\app\build\outputs\apk\okccnl-1.1.10-release.apk'. Tried 3 times (of a maximum of 3) waiting 0,1 sec between attempts.

          [JENKINS-37243] clean project not working after publish

          Code changed in jenkins
          User: Christopher Orr
          Path:
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkUploadTask.java
          http://jenkins-ci.org/commit/google-play-android-publisher-plugin/a32f27d50e34640b15aad706d2d87c2ce63c5b13
          Log:
          Close file stream after determining SHA-1 hash of APK file.

          My assumption is that keeping the file open is the cause of JENKINS-37243.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Orr Path: src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkUploadTask.java http://jenkins-ci.org/commit/google-play-android-publisher-plugin/a32f27d50e34640b15aad706d2d87c2ce63c5b13 Log: Close file stream after determining SHA-1 hash of APK file. My assumption is that keeping the file open is the cause of JENKINS-37243 .

          Sorry, I don't have a Windows machine to test this on at the moment, but please feel free to try out the attached version of the plugin, which potentially has a fix for the issue.

          Christopher Orr added a comment - Sorry, I don't have a Windows machine to test this on at the moment, but please feel free to try out the attached version of the plugin, which potentially has a fix for the issue.

          Seb Fehr added a comment - - edited

          Hey Christopher,

          I tried installing the .hpi you provided and the issue persists.

          It's currently causing every build after any attempt to run the Publisher to fail, as the workspace can no longer be cleaned due to the locked apk. Short of resetting the build slave's connection there doesn't seem to be any way to unlock the file. 

          As a note the .apk does unlock if the upload succeeds, only when the upload is rejected (in the case of same bundle version or error 500 for instance) does it lock the apk file and stop project successfully cleaning.  

          Seb Fehr added a comment - - edited Hey Christopher, I tried installing the .hpi you provided and the issue persists. It's currently causing every build after any attempt to run the Publisher to fail, as the workspace can no longer be cleaned due to the locked apk. Short of resetting the build slave's connection there doesn't seem to be any way to unlock the file.  As a note the .apk does unlock if the upload succeeds, only when the upload is rejected (in the case of same bundle version or error 500 for instance) does it lock the apk file and stop project successfully cleaning.  

            orrc Christopher Orr
            opvolger Bas Magré
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: