• Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • gradle-plugin
    • None
    • Cloudbees Jenkins; Gradle Plugin Version 1.22

      When I configure a job to use the gradlewrapper gradlew gets changed (and possibly a bunch of directories created).

      This is a problem at least to me, since I'd like to use the job for releasing and the release plugin checks that the workingcopy is unmodified (which I can disable, but which is actually a useful and important feature to get reproducable builds)

      Here is a stackoverflow question, created by myself regarding the issue ( http://stackoverflow.com/q/15847518/66686 ):

      The plugin starts by checking if my working copy is clean, so that only properly versioned stuff gets released.

      This works just fine on my local machine. But when I try the same thing in a Jenkins job, the build fails complaining various stuff is changed in the workplace. I decided that a lot of stuff was just internally used by jenkins and added it to `gitignore`:

      caches/
      native/
      wrapper/

      But it also considers `gradlew` as changed:

      FAILURE: Build failed with an exception.

      • What went wrong:
        Execution failed for task ':checkCommitNeeded'.
        > You have uncommitted files:
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        M gradlew
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

          [JENKINS-17505] Gradle Plugin seems to change gradlew

          Jens Schauder added a comment -

          I wonder if this is related to JENKINS-17505 ???

          Jens Schauder added a comment - I wonder if this is related to JENKINS-17505 ???

          Cheng Wei added a comment -

          Hi, Will this bug get fixed? as it has been here for more than a year. I am experiencing the same issue at the moment.

          Cheng Wei added a comment - Hi, Will this bug get fixed? as it has been here for more than a year. I am experiencing the same issue at the moment.

          George Simpson added a comment - - edited

          Answered by jglick in the stack overflow question above:

          commit gradlew with executable bit set:

          git update-index --chmod=+x gradlew
          git commit
          Then you will no longer need the jenkins setting to set it executable, which is the workaround causing your issue.

          George Simpson added a comment - - edited Answered by jglick in the stack overflow question above: commit gradlew with executable bit set: git update-index --chmod=+x gradlew git commit Then you will no longer need the jenkins setting to set it executable, which is the workaround causing your issue.

            gbois Gregory Boissinot
            schauder Jens Schauder
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: