3.7 Compiler - Reference Documentation
Authors: Andres Almiray
Version: 1.2.0
Table of Contents
3.7 Compiler
The following sections explain settings that affect how the compiler behavesMost of these settings may specified in eithergriffon-app/conf/BuildConfig.groovy
(local to project) or $USER_HOME/.griffon/settings.groovy
(global to all projects), with the caveat that values specified at the command prompt will have precedence over those specified config files.
3.7.1 Source Encoding
The assumed source encoding isUTF-8
. You can change this setting by specifying the following flaggriffon.source.encoding
griffon -Dgriffon.source.encoding=='ISO-8859-1' compile
3.7.2 Source and Target Levels
Java source and target levels are chosen by the compiler to whatever values it picks by default (this is akin to specifyingsource
and target
in Ant's javac
task). You can instruct the compiler to use a specific value by defining the following flagsgriffon.project.source.level griffon.project.target.level
griffon -Dgriffon.project.source.level=1.6 -Dgriffon.project.target.level=1.6 compile
3.7.3 Debug Information
Indicates whether Java sources should be compiled with debug information; default isyes
. You can change this setting by specifying the following flaggriffon.project.compiler.debug
3.7.4 Additional Sources
There may be times where additional sources should be compiled along with application sources, for example when a custom patch is needed when targetting a particular platform or applying a security fix that should not be included in the application's versioned sources.Additional sources may be defined inBuildConfig.groovy
in the following waygriffon.compiler.additional.sources = [ 'path/to/custom.patch.directory', 'path/to/security.fix.directory' ]
3.7.5 Additional Resources
Sometimes you' want additional resources to be included with the application but their inclusion is conditional, for example when packaging a generic applicaiton that contains customization for clients A and B you'd want an application per client that only includes the client's respective logos and brand recognition resources. Another example would be protected resources that should not be included in the application's sources under SCM.Additional resources may be defined inBuildConfig.groovy
in the following waygriffon.compiler.additional.resources = [
'path/to/protected/resources'
]