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

Gradle Wrapper not working when gradlew wrapper is in a subfolder

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      If the gradlew script is neither in the same folder as the build script specified by the jenkins gradle plugin nor the root workspace directory it will not be picked up. This is a problem for users of RTC SCM since it may create an additional directory based on the component name.

      Example:

      .jazz5/mycomponent
      mycomponent
          |__gradle
              |__wrapper
          |__my-project
              |__build.gradle
          |__another-folder
          |__gradlew.bat
      

      Looking at the code on github it only tries to find gradlew.bat in the root workspace directory and the same directory as build.gradle (when specified in the options).

      Note that in this directory layout the my-project is not part of a multi-project build but does not live in the component directory.

        Attachments

          Activity

          Hide
          mrichar2 Mark R added a comment - - edited

          After further investigation I have found a way to do what I want with the current gradle plugin. It wasn't clear to me that the "Root Build script" property is supposed to be a directory and corresponds to the "Root Build Script Dir" checkbox.
          Configuration:

          Use Gradle Wrapper
          Check "From Root Build Script Dir"
          Root Build script: ${workspace}/mycomponent
          Build File: my-project/build.gradle
          
          Show
          mrichar2 Mark R added a comment - - edited After further investigation I have found a way to do what I want with the current gradle plugin. It wasn't clear to me that the "Root Build script" property is supposed to be a directory and corresponds to the "Root Build Script Dir" checkbox. Configuration: Use Gradle Wrapper Check "From Root Build Script Dir" Root Build script: ${workspace}/mycomponent Build File: my-project/build.gradle
          Hide
          nasir_uddin Nasir Uddin added a comment -

          For me,

          Not showing "From Root Build Script Dir" field even selected "Use Gradle Wrapper" in jenkins job configuration.
          Would you please have a look. https://issues.jenkins-ci.org/browse/WEBSITE-379

          Show
          nasir_uddin Nasir Uddin added a comment - For me, Not showing "From Root Build Script Dir" field even selected "Use Gradle Wrapper" in jenkins job configuration. Would you please have a look. https://issues.jenkins-ci.org/browse/WEBSITE-379

            People

            Assignee:
            gbois Gregory Boissinot
            Reporter:
            mrichar2 Mark R
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: