Skip to content

Configuration DSL

akhikhl edited this page Sep 6, 2014 · 7 revisions

🚧

This part is yet under construction!


Wuff works without configuration out of the box. You just apply gradle plugin, run "build" task and Wuff does it's job with reasonable defaults.

However, there are cases when you need to fine-tune Wuff. For example you might want to use another version of eclipse distribution.

Wuff supports the following configuration DSL:

wuff {
  localMavenRepositoryDir = new File(System.getProperty('user.home'), '.wuff/m2_repository')

  wuffDir = new File(System.getProperty('user.home'), '.wuff')

  selectedEclipseVersion = '4.3.2'

  eclipseVersion('4.3.2') {
  }
}

  • localMavenRepositoryDir - java.io.File, optional, default value is new File(System.getProperty('user.home'), '.wuff/m2_repository'). Defines which local directory is used as local maven repository for installation of eclipse artifacts.

  • wuffDir - java.io.File, optional, default value is new File(System.getProperty('user.home'), '.wuff'). Defines which local directory is used for caching downloaded eclipse distributions. wuffDir can be safely deleted from the file system any time. Wuff re-creates this directory and downloads eclipse distributions into it as needed.

  • selectedEclipseVersion - string, optional, default value is '4.4'. Defines which version of eclipse is to be downloaded and installed by Wuff tasks. Wuff preconfigures the following eclipse versions to be chosen: '3.7.1', '3.7.2', '4.2.1', '4.2.2', '4.3.1', '4.3.2', '4.4'.

  • eclipseVersion - function(String, Closure), multiplicity 0..n. When called, defines version-specific configuration. Wuff configuration may contain multiple version-specific configurations. Only one version-specific configuration is "active" - this is defined by selectedEclipseVersion.

  • eclipseMavenGroup - string, optional, default value (for version '4.4') is 'eclipse-luna'.

  • eclipseArchiveMirror - string, optional, default is 'http://archive.eclipse.org'. Can be used for specifying common base URL for older packages.

  • sources - function(Closure), multiplicity 0..n.

  • source - function(Map, String), multiplicity 0..n. Essentially "source" specifies URL from which Wuff should download eclipse distribution (or add-on distributions, like eclipse-SDK, delta-pack or language-packs). Additionally it acccepts the following properties:
    • sourcesOnly - optional, boolean. When specified, signifies whether the given distribution package contains only sources. Default value is false. Typical use-case: sourcesOnly=true for eclipse-SDK.
    • languagePacksOnly - optional, boolean. When specified, signifies whether the given distribution package contains only language fragments. Default value is false. Typical use-case: languagePacksOnly=true for eclipse language packs.

  • languagePackTemplate - function(String), multiplicity 0..n. Adds the specified string to the list of language-pack templates.

  • languagePack - function(String), multiplicity 0..n. Iterates all language-pack templates, for each template does:
    • substritute given language and other parameters
    • create source with the resulting url

Additionally the following properties are injected into version-specific configuration and can be used for calculating correct version of eclipse to download:

  • current_os - string, assigned to 'linux', 'windows' or 'macosx', depending on the current operating system.

  • current_arch - string assigned to 'x86_32' or 'x86_64', depending on the current processor architecture.

Clone this wiki locally