Is there a way of removing tasks when using the Groovy plugin?

The use case is replacing a Gant script with a Gradle script but for a
task which currently Gant seems far better suited:  providing a few
targets to act as a command line system.  On the other hand it is a
compile-based project so Gradle should do the job.

The general task is to compile some classes and run the result.  However
there is a (very specialized) distribution build.  There is no Maven or
Ivy install to be done.

The current Gant build offers:

        |> gant -p
        
         clean                Action the cleaning.
         clobber              Action the clobbering.  Do the cleaning first.
         compile              Compile using groovyc.
         compileTests         Compile the tests using groovyc.
         coverage             Generate coverage report with Cobertura.
         coveragecheck        Check coverage results.
         coveragetest         Generate test coverage with Cobertura.
         diagnostics          Run Ant diagnostics.
         initialize           Initialize directories for build.
         initializeCobertura  Set up for using Cobertura.
         instrument           Instrument compiled code for Cobertura.
         jar                  Create the self-standing executable jar file.
         run_compiled         Run the compiled program.
         run_groovy           Run the program using groovy.
         sourcezip            Create distribution zip file of source code.
         test                 Run the tests.
         zip                  Create distribution zip file containing jar file 
and script to run ModeConsole.
        
        Default target is run_compiled.

Trying to create a Gradle-based version, I end up with the task list
below, and I really need to get rid of lots of the targets, especially
the Eclipse related ones which are dangerous as there are static Eclipse
files:

        |> gradle -t
        :taskList
        
        ------------------------------------------------------------
        Root Project
        ------------------------------------------------------------
        Default Tasks: run_compiled
        
        :archive_jar - Generates a jar archive with all the compiled classes.
           -> :test
        :clean - Deletes the build directory.
        :compile - Compiles the Java and Groovy source code.
           -> :processResources
        :compileTests - Compiles the Java and Groovy test source code.
           -> :processTestResources
        :dists 
           -> :libs
        :eclipse - Generates an Eclipse .project and .classpath file.
           -> :eclipseCp, :eclipseProject
        :eclipseClean - Deletes the Eclipse .project and .classpath files.
        :eclipseCp - Generates an Eclipse .classpath file.
        :eclipseProject - Generates an Eclipse .project file.
        :eclipseWtpModule - Generates the Eclipse Wtp files.
        :groovydoc - Generates the groovydoc for the source code.
        :init - The first task of the Java plugin tasks to be excuted. Does 
nothing if not customized.
        :jar - Create the self-standing executable jar file.
           -> :compile
        :javadoc - Generates the javadoc for the source code.
        :libs 
           -> :archive_jar, :test
        :processResources - Process and copy the resources into the binary 
directory of the compiled sources.
           -> :init
        :processTestResources - Process and copy the test resources into the 
binary directory of the compiled test sources.
           -> :compile
        :run_compiled - Run the compiled program.
           -> :compile
        :run_groovy - Run the program using groovy.
        :sourcezip - Create distribution zip file of source code.
           -> :jar
        :test - Runs the tests.
           -> :compileTests
        :zip - Create distribution zip file containing jar file and script to 
run ModeConsole.
           -> :jar
        rule - Pattern: upload<ConfigurationName>Internal: Upload the project 
artifacts of a configuration to the internal Gradle repository.
        rule - Pattern: upload<ConfigurationName>: Upload the project artifacts 
of a configuration to a public Gradle repository.
        rule - Pattern: build<ConfigurationName>: Builds the artifacts 
belonging to the configuration.
        
        BUILD SUCCESSFUL
        
        Total time: 2.852 secs
-- 
Russel.
============================================================
Dr Russel Winder                 Partner

Concertant LLP          t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,     f: +44 8700 516 084    voip:  
sip:[email protected]
London SW11 1EN, UK.    m: +44 7770 465 077    xmpp: [email protected]

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to