Encapsulates the compilation logic required for a Grails application.
Modifiers | Name | Description |
---|---|---|
static java.util.List<java.lang.String> |
EXCLUDED_PATHS |
Fields inherited from class | Fields |
---|---|
class BaseSettingsApi |
appClassName, buildEventListener, buildProps, buildSettings, configSlurper, enableProfile, grailsAppName, grailsHome, isInteractive, metadata, metadataFile, pluginSettings, pluginsHome, resolver |
Type | Name and description |
---|---|
java.lang.String |
basedir |
BuildSettings |
buildSettings |
java.lang.ClassLoader |
classLoader |
java.lang.Object |
commonClasspath |
java.lang.Object |
compileClasspath |
java.util.List<java.lang.String> |
compilerExtensions |
org.codehaus.groovy.control.CompilerConfiguration |
config |
java.lang.String |
encoding |
boolean |
isPluginProject |
java.util.Map |
javaOptions |
PluginBuildSettings |
pluginSettings |
java.lang.Object |
runtimeClasspath |
java.util.List<java.lang.String> |
srcDirectories |
java.lang.String |
srcdir |
java.io.File |
targetClassesDir |
java.io.File |
targetPluginClassesDir |
java.lang.Object |
testClasspath |
boolean |
verbose |
Constructor and description |
---|
GrailsProjectCompiler
(PluginBuildSettings pluginBuildSettings, java.lang.ClassLoader rootLoader = Thread.currentThread() Constructs a new GrailsProjectCompiler instance for the given PluginBuildSettings and optional classloader |
Type | Name and description |
---|---|
void |
compile() Compiles project sources using the target directory passed by PluginBuildSettings |
void |
compile(java.lang.Object targetDir) Compiles project sources to the given target directory |
void |
compileAll() Compiles plugin and normal sources |
void |
compileGroovyPages(java.lang.String grailsAppName, java.lang.Object classesDir = targetClassesDir) Compiles GSP pages for the given application name to the (optional) target directory |
protected java.lang.Object |
compilePluginDescriptor(java.io.File descriptor, java.io.File classesDir) Compiles a given plugin descriptor file - *GrailsPlugin.groovy. |
void |
compilePlugins() |
void |
compilePlugins(java.lang.Object targetDir) Compiles plugin sources files to the given target directory |
void |
configureClasspath() Configures the Grails classpath, should be called prior to any call to compile(Object) |
groovy.util.AntBuilder |
getAnt() |
java.util.List<java.io.File> |
getExtraDependencies() Extra dependencies defined by the 'grails.compiler.dependencies' config option in BuildConfig |
java.util.List<java.io.File> |
getJarFiles() Obtains all JAR files for the project that aren't declared via BuildConfig |
void |
reconfigureClasspath() |
void |
setAnt(groovy.util.AntBuilder ant) |
void |
withCompilationErrorHandling(groovy.lang.Closure callable) |
Constructs a new GrailsProjectCompiler instance for the given PluginBuildSettings and optional classloader
pluginBuildSettings
- The PluginBuildSettingsrootLoader
- The ClassLoaderCompiles project sources using the target directory passed by PluginBuildSettings
Compiles project sources to the given target directory
targetDir
- The target directory to compile toCompiles plugin and normal sources
Compiles GSP pages for the given application name to the (optional) target directory
grailsAppName
- The app nameclassesDir
- The optional classes dir, defaults to one provided by PluginBuildSettings in constructorCompiles a given plugin descriptor file - *GrailsPlugin.groovy.
Compiles plugin sources files to the given target directory
targetDir
- The target directory to compile toConfigures the Grails classpath, should be called prior to any call to compile(Object)
Extra dependencies defined by the 'grails.compiler.dependencies' config option in BuildConfig
Obtains all JAR files for the project that aren't declared via BuildConfig
Groovy Documentation