[GRADLE-342] Compile task needs to support the compilerarg parameters Created: 29/Dec/08  Updated: 04/Jan/13  Resolved: 03/Jan/09

Status: Resolved
Project: Gradle
Affects Version/s: 0.5
Fix Version/s: 0.5.1

Type: New Feature
Reporter: Hamlet D'Arcy Assignee: Hans Dockter
Resolution: Fixed Votes: 0


The compile task does not currently support compiler args.

For instance, I need the following Ant script to be supported:

<target name="check-interning" depends="clean">
<javac ...
<compilerarg value="-version"/>
<compilerarg line="-target 5"/>

Comment by Hans Dockter [ 03/Jan/09 ]

The compile options have now a compilerArgs property.


compile.options.compilerArgs = [[value: "-Xlint:unchecked", compiler: "modern"], [value: "-cp"], [path: "x:y:z"]]

The compilerArgs property is a list of maps. Each map corresponds to a nested javac compilerarg element. I was thinking about some nicer DSL syntax on top but so far I could not think of any that's worth it.

Comment by Michael Ernst [ 15/Nov/10 ]

compile.options.compilerArgs is not documented in the Gradle User Guide, so the only way a user can learn about it is via this bug report and a changelog (http://docs.codehaus.org/display/GRADLE/Gradle+0.8+Breaking+Changes), or by searching mailing lists.

It would be great if the User Guide could document this useful functionality.

Generated at Wed Jun 30 11:27:42 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.