Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-1059

Provide command line options for more or less verbose task listings

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.9-rc-2

      Description

      Using the build_daemon branch and taking advantage of task grouping, a -t listing can look something like the following:

      ------------------------------------------------------------
      Root Project
      ------------------------------------------------------------
      
      Build tasks
      -----------
      :assemble - Builds all Jar, War, Zip, and Tar archives. [:distArchive]
      :build [:assemble, :check]
      :clean - Deletes the build directory.
      :distArchive - Builds the distribution zip file [:docs:assemble, :spring-amqp-core:assemble, :spring-amqp-samples:helloworld:assemble, :spring-amqp-samples:stocks:assemble, :spring-erlang:assemble, :spring-rabbit-admin:assemble, :spring-rabbit:assemble]
      
      Buildmaster tasks
      -----------------
      :uploadArchives - Uploads the distribution zip file. [:distArchive]
      :wrapper - Generates gradlew and gradlew.bat bootstrap scripts
      
      Verification tasks
      ------------------
      :check
      :snapshotDependencyCheck - Aborts the build if any Java project has snapshot dependencies.
          :snapshotDependencyReport - Issues a snapshot dependency report across all Java projects
      
      Rules
      -----
      Pattern: build<ConfigurationName>: Builds the artifacts belonging to a configuration.
      Pattern: upload<ConfigurationName>: Uploads the project artifacts of a configuration to a public Gradle repository.
      Pattern: clean<TaskName>: Cleans the output files of a task.
      
      BUILD SUCCESSFUL
      
      Total time: 2.576 secs
      

      This is nice, but more verbose than the average user may want to see. Ideally, -t would output the following:

      ------------------------------------------------------------
      Root Project
      ------------------------------------------------------------
      
      Build tasks
      -----------
      :assemble - Builds all Jar, War, Zip, and Tar archives.
      :build - Description for build.
      :clean - Deletes the build directory.
      :distArchive - Builds the distribution zip file.
      
      Buildmaster tasks
      -----------------
      :uploadArchives - Uploads the distribution zip file.
      :wrapper - Generates gradlew and gradlew.bat bootstrap scripts.
      
      Verification tasks
      ------------------
      :check
      :snapshotDependencyCheck - Aborts the build if any Java project has snapshot dependencies.
      
      Rules
      -----
      Pattern: build<ConfigurationName>: Builds the artifacts belonging to a configuration.
      Pattern: upload<ConfigurationName>: Uploads the project artifacts of a configuration to a public Gradle repository.
      Pattern: clean<TaskName>: Cleans the output files of a task.
      
      BUILD SUCCESSFUL
      
      Total time: 2.576 secs
      

      Then, if the user wishes to see more information, such as the task dependencies in the initial listing, -tt could be issued, meaning "more verbose task listing".

      Indeed, a vanilla gradle -t could provide a hint at the bottom of the listing "use -tt for more information".

      As an aside, I don't know that it makes much sense to print out 'BUILD SUCCESSFUL' after a -t listing.

        Attachments

          Activity

            People

            Assignee:
            hans_d Hans Dockter
            Reporter:
            cbeams Chris Beams
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: