Multi project build vs sourceSets


(VENKATA GIRIDHAR) #1

I am new to Gradle. Looking for suggestions. We have codebase with following layout.

(root)
|-sdk/src
|-java/com/org/framework
java/com/org/reports
java/com/org/feature/OSconnector
java/com/org/feature/UNIXconnector
java/com/org/feature/WINDOWSconnector
java/com/org/feature/,…

SDK is independent module. where as connector modules ( like this we have 15 modules ) are inter-dependent & also dependent on framework; ( no proper code refactoring done as it consume more test cycles and unknown risks )

finally we need to generate sdk-.jar , feature-.jar and all connectors jars { OSconnector-.jar, UNIXconnector-.jar…etc}

These connectors jars & sdk/framework jar should be uploaded into artifactory (jfrog) and resolve dependency for consecutive builds to save build time for developers working on a particular connector. Also release them individually.or group them on need basis.

All jars should be staged under single directory. ( eg: build/libs under root )

As there are many connectors, should we implement build.gradle under each connector ( sub-project)? can we use multiple separate sourceSets? which approach is better.

Any sample for reference?