Groovy Documentation

com.evinceframework.gradle.dojoBuilder
[Groovy] Class BuildProfile

java.lang.Object
  com.evinceframework.gradle.dojoBuilder.BuildProfile

class BuildProfile

Defines settings for the build. These settings are used to build a profile to use when building. More information about the settings can be found at http://dojotoolkit.org/documentation/tutorials/1.8/build/

Authors:
Craig Swing
Since:
0.1.0


Property Summary
java.lang.Object bootLayer

The default boot layer.

java.lang.String cssOptimize

Deals with how CSS is optimized.

java.lang.String filename

The filename to write the build profile to.

java.lang.Object layerOptimize

Sets the minification setting for layers.

java.lang.Object layers

This allows you to create different "layer" modules as part of a build that contain discreet functionality all built into single file.

boolean mini

This determines if the build is a "mini" build or not.

java.lang.Object optimize

Sets the minification for modules that aren't part of a layer.

java.lang.Object packages

This is an array of hashes of package information which the builder uses when mapping modules.

java.lang.String releaseName

This provides a name to a particular release when outputting it.

java.lang.String selectorEngine

This identifies the default selector engine for the build and builds it into the code.

java.lang.String stripConsole

This determines how console handling is dealt with in the output code.

 
Constructor Summary
BuildProfile(DojoBuilderConvention convention)

Default constructor.

 
Method Summary
java.lang.Object boot(java.lang.Object obj)

Define the boot layer for the custom build.

java.lang.Object configure(groovy.lang.Closure closure)

Allow for properties to be defined in a build script using a closure.

java.lang.String getBasePath()

This is the "root" of the build, from where the rest of the build will be calculated from.

java.lang.String getReleaseDir()

This is the root directory where the build should go.

java.lang.Object layer(java.lang.Object obj)

Add a non boot layer to the build profile.

java.lang.Object pkg(java.lang.Object obj)

Adds a package to the build profile.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Property Detail

bootLayer

java.lang.Object bootLayer
The default boot layer. If defined this will appear as the first layer in the build profile.


cssOptimize

java.lang.String cssOptimize
Deals with how CSS is optimized. Defaults to "comments" A value of "comments" will strip out comments and extra lines and inline any
import:
commands. A value of "comments.keepLines" strips the comments and inlines the
@imports, but preserves any line breaks.


filename

java.lang.String filename
The filename to write the build profile to. The default value is
build.profile.js


layerOptimize

java.lang.Object layerOptimize
Sets the minification setting for layers. This defaults to "shrinksafe". A value of false turns off minification and the other valid values are "shrinksafe.keeplines", "closure", "closure.keeplines", "comment", and "comment.keeplines".


layers

java.lang.Object layers
This allows you to create different "layer" modules as part of a build that contain discreet functionality all built into single file.


mini

boolean mini
This determines if the build is a "mini" build or not. If true it will exclude files that are tagged as miniExclude which is typically things like tests, demos and other items not required for the build to work. This defaults to false.


optimize

java.lang.Object optimize
Sets the minification for modules that aren't part of a layer. This defaults to false and takes the same values as layerOptimize.
See Also:
layerOptimize


packages

java.lang.Object packages
This is an array of hashes of package information which the builder uses when mapping modules. This provides flexibility in locating in different places and the pulling it together when you build.


releaseName

java.lang.String releaseName
This provides a name to a particular release when outputting it. This is appended to the releaseDir. For example, if you are going to release your code in release/prd you could set your releaseDir to release and your releaseName to prd.
See Also:
getReleaseDir()


selectorEngine

java.lang.String selectorEngine
This identifies the default selector engine for the build and builds it into the code. While this does not directly make the code smaller, it ensure that a selector engine won't require another call to be loaded. It defaults to "acme" and the two engines included with Dojo are "lite" and "acme".


stripConsole

java.lang.String stripConsole
This determines how console handling is dealt with in the output code. This defaults to "normal" which strips all console messages except console.error and console.warn. It is important to note though, this feature only applies when there is a level of optimization going on, otherwise it is ignored. Other possible values are "none", "warn" and "all"


 
Constructor Detail

BuildProfile

BuildProfile(DojoBuilderConvention convention)
Default constructor. Properties from the DojoBuilderConvention are required for calculated fields.
Parameters:
convention


 
Method Detail

boot

java.lang.Object boot(java.lang.Object obj)
Define the boot layer for the custom build.
Parameters:
obj


configure

java.lang.Object configure(groovy.lang.Closure closure)
Allow for properties to be defined in a build script using a closure. Automatically adds the dojo and dijit packages to the profile. Usage: dojo { dojoVersion='1.8.3' sourceRepository=javascriptRepo buildWithNode=project.hasProperty('useNode').toBoolean() && project.useNode.toBoolean() profile.configure { pkg name: 'dojox' pkg name: 'evf-example', location: "${sourceDestination}" boot() layer name: 'evf-example/app', includes: ['evf-example/CustomWidget'] } }
Parameters:
closure
Returns:


getBasePath

java.lang.String getBasePath()
This is the "root" of the build, from where the rest of the build will be calculated from. This is relative to where the build profile is located.


getReleaseDir

java.lang.String getReleaseDir()
This is the root directory where the build should go. The builder will attempt to create this directly and will overwrite anything it finds there. It is relative to the basePath
See Also:
getBasePath()


layer

java.lang.Object layer(java.lang.Object obj)
Add a non boot layer to the build profile. At least one module must be included. If a boot layer is defined, the includes of the boot layer are automatically added to the excludes of the layer.
Parameters:
obj


pkg

java.lang.Object pkg(java.lang.Object obj)
Adds a package to the build profile.
Parameters:
obj


 

Groovy Documentation