Gradle DM: decalre multiple artifacts in a single module


(Abhishek Nath) #1

In Gradle, is it possible to declare multiple artifacts in a single module like this?

<dependency name="httpcomponents-client" rev="4.1" conf="build->default">
       <artifact name="httpclient" type="jar"/>
       <artifact name="httpcore" type="jar"/>
</dependency>

Our repo does not have ixy xml for third party jars. Repo structure for this module is:

ivy/release/httpcomponents-client/
 |- jars/httpclient-4.1.jar
 |- jars/httpcore-4.1.jar

(Abhishek Nath) #2

Nevermind. I have got it working using artifact closure.

compile ('expedia:httpcomponents-client:4.+') {
      artifact {
             name='httpclient'
             type='jar'
      }
      artifact {
             name='httpcore'
             type='jar'
      }
                 }