14.7 Understanding Plugin Order - Reference Documentation
Authors: Andres Almiray
Version: 1.2.0
14.7 Understanding Plugin Order
Controlling Plugin Dependencies
Plugins often depend on the presence of other plugins and can also adapt depending on the presence of others. To cover this, a plugin can define adependsOn
property. For example, take a look at this snippet from the Griffon Clojure plugin:class ClojureGriffonPlugin { String version = '0.9' String dependsOn = ['lang-bridge': '0.5']}
lang-bridge
plugin.Essentially the dependencies will be loaded first and then the Clojure plugin. If all dependencies do not load, then the plugin will not load.The dependsOn
property also supports a mini expression language for specifying version ranges. A few examples of the syntax can be seen below:def dependsOn = [foo:"* > 1.0"] def dependsOn = [foo:"1.0 > 1.1"] def dependsOn = [foo:"1.0 > *"]
- 1.1
- 1.0
- 1.0.1
- 1.0.3-SNAPSHOT
- 1.1-BETA2
Controlling Addon Load Order
Addons will be loaded in the order determined by the dependencies set forth in their containing plugins. UsingdependsOn
establishes a "hard" dependency. Any addons provided by the dependencies will be added first to the builder configuration file when installed.