Griffon features 5 dependency resolution configurations (or 'scopes') which you can take advantage of:
-
build
: Dependencies for the build system only
-
compile
: Dependencies for the compile step
-
runtime
: Dependencies needed at runtime but not for compilation (see above)
-
test
: Dependencies needed for testing but not at runtime (see above)
Within the dependencies
block you can specify a dependency that falls into one of these configurations by calling the equivalent method. For example if your application requires the MySQL driver to function at runtime
you can specify as such:runtime 'com.mysql:mysql-connector-java:5.1.5'
The above uses the string syntax which is group:name:version
. You can also use a map-based syntax:runtime group:'com.mysql', name:'mysql-connector-java', version:'5.1.5'
Multiple dependencies can be specified by passing multiple arguments:runtime 'com.mysql:mysql-connector-java:5.1.5',
'commons-lang:commons-lang:2.6'// Orruntime(
[group: 'com.mysql', name: 'mysql-connector-java', version: '5.1.5'],
[group: 'commnons-lang', name: 'commons-lang', version: '2.6']
)
You may specify a classifier tooruntime 'net.sf.json-lib:json-lib:2.4:jdk15'// Orruntime group: 'net.sf.json-lib' name: 'json-lib', version: '2.4', classifier: 'jdk15'