Groovy Documentation

org.standardout.gradle.plugin.platform
[Groovy] Class PlatformPluginExtension

java.lang.Object
  org.standardout.gradle.plugin.platform.PlatformPluginExtension

class PlatformPluginExtension

Extension for the platform plugin.

Authors:
Simon Templer


Field Summary
static groovy.lang.Closure ADLER32

Hash calculator using the Adler32 checksum algorithm.

static groovy.lang.Closure MAJOR

Version strategy that requires a minimum version and extends to (not including) the next major version.

static groovy.lang.Closure MINIMUM

Version strategy that uses the given version as minimum version.

static groovy.lang.Closure MINOR

Version strategy that requires a minimum version and extends to (not including) the next minor version.

static groovy.lang.Closure NONE

Version strategy that uses no version constraint for imports.

 
Property Summary
java.util.Map artifacts

Maps artifact IDs to BundleArtifacts

boolean auxVersionedSymbolicNames

States if the symbolic names for bundles created via the platformaux configuration should be adapted to include the version number.

java.lang.String categoryId

The ID of the feature's category in the update site.

java.lang.String categoryName

The name of the feature's category in the update site.

Configurations configurations

Stores bnd configurations.

java.lang.String defaultQualifier

The default version qualifier to use for wrapped bundles.

boolean determineImportVersions

States if the package import versions for automatically wrapped bundles should be determined automatically.

java.io.File eclipseHome

The directory of a local Eclipse installation.

java.lang.Object eclipseMirror

Nested map that is checked for Eclipse download URLs, keys are osgiOS (win32, linux, macosx), osgiWS (win32, gtk, cocoa) and arch (x86, x86_64) in that order.

java.lang.String featureId

The ID for the platform feature.

java.lang.String featureName

The name for the platform feature.

java.lang.String featureVersion

The platform feature version, defaults to the project version if possible, otherwise to 1.0.0.

boolean fetchSources

States if source for external dependencies should be fetched and corresponding source bundles created.

groovy.lang.Closure hashCalculator

Defines the hash calculator used for calculating hash qualifiers from bnd configuration.

java.util.Set importIgnorePackages

Packages to ignore when analyzing packages of dependencies to determine package import version numbers.

groovy.lang.Closure importVersionStrategy

Defines the global import version strategy.

org.gradle.api.Project project

java.io.File updateSiteDir

The directory to place the update site in.

java.io.File updateSiteZipFile

The target file for the 'updateSiteZip' task.

boolean useBndHashQualifiers

States if bundle version qualifiers should be tagged with hashes calculated from the bnd configuration.

 
Constructor Summary
PlatformPluginExtension(org.gradle.api.Project project)

 
Method Summary
java.lang.Object bnd(java.lang.Object dependencyNotation, groovy.lang.Closure bndClosure)

Call bnd to configure artifact, but don't add as dependency.

java.lang.Object bnd(groovy.lang.Closure bndClosure)

Call bnd to extend/overwrite the default bnd configuration for all bundles.

java.lang.Object bundle(java.lang.Object dependencyNotation, groovy.lang.Closure configClosure = null)

Call bundle to add a dependency.

void imports(java.lang.Object dependencyNotation, groovy.lang.Closure importsClosure)

Call to configure the behaviour for other bundles importing a given dependency.

java.lang.Object merge(java.util.Map properties = [failOnDuplicate: true, groovy.lang.Closure mergeClosure)

Call merge to create bundle that is merged from different dependencies.

java.lang.Object override(groovy.lang.Closure bndClosure)

Call to override the behavior for all created bundles, even existing bundles.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), 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()
 

Field Detail

ADLER32

public static final groovy.lang.Closure ADLER32
Hash calculator using the Adler32 checksum algorithm.


MAJOR

public static final groovy.lang.Closure MAJOR
Version strategy that requires a minimum version and extends to (not including) the next major version.


MINIMUM

public static final groovy.lang.Closure MINIMUM
Version strategy that uses the given version as minimum version.


MINOR

public static final groovy.lang.Closure MINOR
Version strategy that requires a minimum version and extends to (not including) the next minor version.


NONE

public static final groovy.lang.Closure NONE
Version strategy that uses no version constraint for imports.


 
Property Detail

artifacts

final java.util.Map artifacts
Maps artifact IDs to BundleArtifacts


auxVersionedSymbolicNames

boolean auxVersionedSymbolicNames
States if the symbolic names for bundles created via the platformaux configuration should be adapted to include the version number. This is useful when dealing with systems that have problems when there actually are bundles with the same name but different versions. An example is Eclipse RCP plugin-based products - they can include only one version of a bundle with the same name.


categoryId

java.lang.String categoryId
The ID of the feature's category in the update site.


categoryName

java.lang.String categoryName
The name of the feature's category in the update site.


configurations

final Configurations configurations
Stores bnd configurations.


defaultQualifier

java.lang.String defaultQualifier
The default version qualifier to use for wrapped bundles. If a qualifier is already present the default will be appended, separated by a dash. Please note that this does not apply to file based dependencies automatically (otherwise it might mess with existing source bundle associations). Set addQualifier to true in the corresponding bnd configuration to enable it for a file based dependency.


determineImportVersions

boolean determineImportVersions
States if the package import versions for automatically wrapped bundles should be determined automatically. This also will by default make package imports optional that are not found in dependencies.


eclipseHome

java.io.File eclipseHome
The directory of a local Eclipse installation. If none is specified the ECLIPSE_HOME system property is checked, if it is not given as well it is tried to download Eclipse based on the URLs defined in eclipseMirror


eclipseMirror

java.lang.Object eclipseMirror
Nested map that is checked for Eclipse download URLs, keys are osgiOS (win32, linux, macosx), osgiWS (win32, gtk, cocoa) and arch (x86, x86_64) in that order. Specify an alternate Eclipse mirror like this: eclipseMirror.win32.win32.x86 = 'http://...'


featureId

java.lang.String featureId
The ID for the platform feature.


featureName

java.lang.String featureName
The name for the platform feature.


featureVersion

java.lang.String featureVersion
The platform feature version, defaults to the project version if possible, otherwise to 1.0.0.


fetchSources

boolean fetchSources
States if source for external dependencies should be fetched and corresponding source bundles created.


hashCalculator

groovy.lang.Closure hashCalculator
Defines the hash calculator used for calculating hash qualifiers from bnd configuration. The closure takes a String and should return the hash as byte array. The qualifier will then be the base 64 encoded hash.


importIgnorePackages

final java.util.Set importIgnorePackages
Packages to ignore when analyzing packages of dependencies to determine package import version numbers.


importVersionStrategy

groovy.lang.Closure importVersionStrategy
Defines the global import version strategy. The strategy is a closure taking an OSGi version number and returning a version assignment for bnd as String.


project

final org.gradle.api.Project project


updateSiteDir

java.io.File updateSiteDir
The directory to place the update site in. Will default to 'updatesite' in the build folder.


updateSiteZipFile

java.io.File updateSiteZipFile
The target file for the 'updateSiteZip' task.


useBndHashQualifiers

boolean useBndHashQualifiers
States if bundle version qualifiers should be tagged with hashes calculated from the bnd configuration. Overrides the default qualifier for bundles where a bnd configuration is present. Please note that this does not apply to file based dependencies (otherwise it might mess with existing source bundle associations).


 
Constructor Detail

PlatformPluginExtension

PlatformPluginExtension(org.gradle.api.Project project)


 
Method Detail

bnd

java.lang.Object bnd(java.lang.Object dependencyNotation, groovy.lang.Closure bndClosure)
Call bnd to configure artifact, but don't add as dependency.
Parameters:
dependencyNotation - a dependency notation as supported by Gradle
bndClosure - a closure that specifying the custom bnd configuration
Returns:


bnd

java.lang.Object bnd(groovy.lang.Closure bndClosure)
Call bnd to extend/overwrite the default bnd configuration for all bundles. Note that the default configuration does not apply to Jars that already were bundles.


bundle

java.lang.Object bundle(java.lang.Object dependencyNotation, groovy.lang.Closure configClosure = null)
Call bundle to add a dependency.
Parameters:
dependencyNotation - a dependency notation as supported by Gradle
configClosure - a closure that performs dependency configuration
Returns:


imports

void imports(java.lang.Object dependencyNotation, groovy.lang.Closure importsClosure)
Call to configure the behaviour for other bundles importing a given dependency.
Parameters:
dependencyNotation - the dependency notation
importsClosure - the imports configuration closure
Returns:


merge

java.lang.Object merge(java.util.Map properties = [failOnDuplicate: true, groovy.lang.Closure mergeClosure)
Call merge to create bundle that is merged from different dependencies.
Parameters:
mergeClosure - the merge closure, specifying a match and bnd configuration
Returns:


override

java.lang.Object override(groovy.lang.Closure bndClosure)
Call to override the behavior for all created bundles, even existing bundles. Use with care.


 

Groovy Documentation