How to declare a dependency on a zip archive using the map notation?


(david koch) #1

When using the type property for declaring a dependency on zip module I get an error. How do I declare a dependency on a zip archive using the map notation? I cannot find anything in the api doc.

Declaration

dependencies{
  installation ext.modules.commonsDaemon +[classifier: 'windows', type: 'zip']
//group: 'commons-daemon', name: 'commons-daemon', version: '1.0.10'
}

Error

Deprecated dynamic property: "type" on "DefaultExternalModuleDependency{group='commons-daemon', name='commons-daemon', v
ersion='1.0.10', configuration='default'}", value: "zip".

Thanks, David


(René Groeschke) #2

you can use the ‘ext’ keyword to define the extension of a dependency. try this:

dependencies{
  installation ext.modules.commonsDaemon +[classifier: 'windows', ext: 'zip']
//group: 'commons-daemon', name: 'commons-daemon', version: '1.0.10'
}

this is mentioned in the userguide at http://gradle.org/docs/current/userguide/dependency_management.html#sec:how_to_declare_your_dependencies

regards, René


(david koch) #3

Great, thanks David