Class Groovyc
In: lib/buildr/groovy/compiler.rb  (CVS)
Parent: Compiler::Base

Groovyc compiler:

 compile.using(:groovyc)

You need to require ‘buildr/groovy/compiler’ if you need to use this compiler.

Used by default if .groovy files are found in the src/main/groovy directory (or src/test/groovy) and sets the target directory to target/classes (or target/test/classes).

Groovyc is a joint compiler, this means that when selected for a project, this compiler is used to compile both groovy and java sources. It‘s recommended that Groovy sources are placed in the src/main/groovy directory, even though this compiler also looks in src/main/java

Groovyc accepts the following options:

  • :encoding — Encoding of source files
  • :verbose — Asks the compiler for verbose output, true when running in verbose mode.
  • :fork — Whether to execute groovyc using a spawned instance of the JVM; defaults to no
  • :memoryInitialSize — The initial size of the memory for the underlying VM, if using fork mode; ignored otherwise.
                                      Defaults to the standard VM memory setting. (Examples: 83886080, 81920k, or 80m)
    
  • :memoryMaximumSize — The maximum size of the memory for the underlying VM, if using fork mode; ignored otherwise.
                                      Defaults to the standard VM memory setting. (Examples: 83886080, 81920k, or 80m)
    
  • :listfiles — Indicates whether the source files to be compiled will be listed; defaults to no
  • :stacktrace — If true each compile error message will contain a stacktrace
  • :warnings — Issue warnings when compiling. True when running in verbose mode.
  • :debug — Generates bytecode with debugging information. Set from the debug
                                      environment variable/global option.
    
  • :deprecation — If true, shows deprecation messages. False by default.
  • :optimise — Generates faster bytecode by applying optimisations to the program.
  • :source — Source code compatibility.
  • :target — Bytecode compatibility.
  • :javac — Hash of options passed to the ant javac task

Constants

REQUIRES = ArtifactNamespace.for(self) do |ns| ns.groovy! 'org.codehaus.groovy:groovy:jar:>=1.7.5'   The groovyc compiler jars are added to classpath at load time, if you want to customize artifact versions, you must set them on the
     artifact_ns(Buildr::Groovy::Groovyc).groovy = '1.7.1'

namespace before this file is required.

[Validate]