3.5.1 Configurations and Dependencies - Reference Documentation
Authors: Andres Almiray
Version: 1.2.0
3.5.1 Configurations and Dependencies
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)
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'
group:name:version
. You can also use a map-based syntax:runtime group:'com.mysql', name:'mysql-connector-java', version:'5.1.5'
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'] )
runtime 'net.sf.json-lib:json-lib:2.4:jdk15'// Orruntime group: 'net.sf.json-lib' name: 'json-lib', version: '2.4', classifier: 'jdk15'