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

GenerateTestHpl task should be reusable and declare its inputs and dependencies

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • gradle-jpi-plugin
    • None

      We're using the gradle-jpi-plugin for one subproject in a multi-module build. We needed to consume a .hpl file in another subproject. Thus, we used theĀ GenerateTestHpl task to generate the.hpl and noticed a few problems:

      • The task does not declare its dependencies, i.e. if the Jenkins plugin subproject is not built, the Resource-Path property in the resulting file was incomplete because the classes directories did not exist at the time it was written.
      • The task does not declare its inputs, i.e. if a relevant property such as the shortName changes, it is still up-to-date.
      • The server task also generates a .hpl file but does not use the GenerateTestHpl task. It would be more idiomatic and reduce duplication to have a generic task that can generate a .hpl file and configure it once for the server task and once for the generate-test-hpl task.

      Proposals: Introduce "generic" GenerateHpl task that properly declares its inputs, outputs, and dependencies and use it for both the server and generate-test-hpl task.

      If you agree with the above proposal, we could submit a PR.

            sghill Steve Hill
            marcphilipp Marc Philipp
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: