Groovy Documentation

org.gradle.api.tasks.compile
[Groovy] Class CompileOptions

java.lang.Object
  org.gradle.api.tasks.compile.AbstractOptions
      org.gradle.api.tasks.compile.CompileOptions

class CompileOptions
extends AbstractOptions

Authors:
Hans Dockter


Property Summary
String bootClasspath

The bootstrap classpath to use when compiling.

String compiler

The compiler to use.

List compilerArgs

The arguments to pass to the compiler.

boolean debug

Specifies whether debugging information should be included in the generated .class files.

DebugOptions debugOptions

Options for generating debugging information.

DependOptions dependOptions

The options for using the Ant task.

boolean deprecation

Specifies whether to log details of usage of deprecated members or classes.

String encoding

The source encoding name.

String extensionDirs

The extension dirs to use when compiling.

boolean failOnError

Specifies whether the compile task should fail when compilation fails.

boolean fork

Specifies whether to run the compiler in its own process.

ForkOptions forkOptions

The options for running the compiler in a child process.

boolean includeJavaRuntime

boolean listFiles

Specifies whether the compile task should list the files to be compiled.

boolean optimize

Whether to produce optimized byte code.

boolean useAnt

Whether to use the Ant javac task or Gradle's own Java compiler integration.

boolean useDepend

Specifies whether to use the Ant task.

boolean verbose

Specifies whether the compile task should produce verbose output.

boolean warnings

Specifies whether to log warning messages.

 
Method Summary
CompileOptions debug(Map debugArgs)

Convenience method to set debug options with named parameter syntax.

CompileOptions depend(Map dependArgs)

Set the dependency options from a map.

List excludedFieldsFromOptionMap()

Map fieldName2AntMap()

Map fieldValue2AntMap()

CompileOptions fork(Map forkArgs)

Convenience method to set fork options with named parameter syntax.

Map optionMap()

void setCompiler(String compiler)

 
Methods inherited from class AbstractOptions
addValueToMapIfNotNull, define, excludedFieldsFromOptionMap, fieldName2AntMap, fieldValue2AntMap, isOptionField, optionMap
 

Property Detail

bootClasspath

@Input
@Optional
String bootClasspath
The bootstrap classpath to use when compiling.


compiler

@Deprecated
@Input
@Optional
String compiler
The compiler to use.


compilerArgs

@Input
List compilerArgs
The arguments to pass to the compiler.


debug

@Input
boolean debug
Specifies whether debugging information should be included in the generated .class files. The default is true. See DebugOptions#debugLevel#debugLevel for which debugging information will be generated.


debugOptions

@Nested
DebugOptions debugOptions
Options for generating debugging information.


dependOptions

DependOptions dependOptions
The options for using the Ant task.


deprecation

boolean deprecation
Specifies whether to log details of usage of deprecated members or classes. The default is false.


encoding

@Input
@Optional
String encoding
The source encoding name. Uses the platform default encoding if not specified. The default is null.


extensionDirs

@Input
@Optional
String extensionDirs
The extension dirs to use when compiling.


failOnError

@Input
boolean failOnError
Specifies whether the compile task should fail when compilation fails. The default is true.


fork

boolean fork
Specifies whether to run the compiler in its own process. The default is false.


forkOptions

@Nested
ForkOptions forkOptions
The options for running the compiler in a child process.


includeJavaRuntime

@Input
boolean includeJavaRuntime


listFiles

boolean listFiles
Specifies whether the compile task should list the files to be compiled.


optimize

@Input
boolean optimize
Whether to produce optimized byte code. Note that this flag is ignored by Sun's javac starting with JDK 1.3 (since compile-time optimization is unnecessary)


useAnt

boolean useAnt
Whether to use the Ant javac task or Gradle's own Java compiler integration. Defaults to false.


useDepend

boolean useDepend
Specifies whether to use the Ant task.


verbose

boolean verbose
Specifies whether the compile task should produce verbose output.


warnings

boolean warnings
Specifies whether to log warning messages. The default is true.


 
Method Detail

debug

CompileOptions debug(Map debugArgs)
Convenience method to set debug options with named parameter syntax.


depend

CompileOptions depend(Map dependArgs)
Set the dependency options from a map. See DependOptions for a list of valid properties. Calling this method will enable use of the depend task during a compile.


excludedFieldsFromOptionMap

List excludedFieldsFromOptionMap()


fieldName2AntMap

Map fieldName2AntMap()


fieldValue2AntMap

Map fieldValue2AntMap()


fork

CompileOptions fork(Map forkArgs)
Convenience method to set fork options with named parameter syntax.


optionMap

Map optionMap()


setCompiler

void setCompiler(String compiler)


 

Gradle API 1.0-milestone-9