Gradle - SIngle with Multiple Jars into Maven Repository -


i have gradle project when build creates multiple jar files based on rules classes a,b , c goto a.jar, classes d,e , f goto b.jar , on.

now want upload these jar files maven repository. though able want put each of these jars in maven repository standalone artifact.

for ex: right if have project named myproject , has produces 2 jar files : a.jar , b.jar, in maven repository have following structure

-------   repo           |           |----com                |                |--- project                     |                     |---- myproject                           |                           |---- version 1                             |                              |--- a.jar                             |--- b.jar  

but want following structure

-------   repo           |           |----com                |                |--- project                     |                     |---- myproject                           |                           |----                             |                              |--- version 1                               |                               |--- a.jar                             |---- b                              |                             |---- version 1                                |                                |--- b.jar 

that means want make sure both a.jar , b.jar 2 different artifacts in maven repository, can maintain different version of two.

right now, in order put both jars in maven repository made sure add following piece of code in build.gradle.

artifacts {   archives a,b     } 

one solution have 2 different gradle projects containing relevant classes , each project producing own artefact in case can't short term solution. have planned has low priority.

it's documented in gradle user guide. see multiple artifacts per project if using "maven" plugin, , publishing multiple modules if using "maven-publish" plugin.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -