When should I go for a multi-project build?

(Florian Schmaus) #1

I am currently in the process of migrating Smack’s (a FOSS XMPP client library) build system from ant to gradle. Basically Smack consists of 4 components

  • smack: Implements XMPP-CORE and XMPP-IM - smackx: Implements the various XMPP XEPs - smackx-experimental: XEP implementation in a experimental state - debug: A GUI debugger, that intercepts the exchanged XMPP stanzas

Now, I have a first draft of the build.gradle file, I was wondering if it would be wise to switch to a multi-project setup. What would the gradle community recommend? I am also interested about other comments/suggestions about my build.gradle file. :slight_smile:

(Radim Kubacki) #2

From what I see in your project I’d definitely recommend to migrate to multi-project setup. One reason that comes to my mind is that IDEs will better understand how to work with your project files when you move from your existing source sets into separate sub-project with their (non-circular) dependencies.

(Florian Schmaus) #3

Thanks. I’ve switched to multi-project now, and it was surprisingly easy. I can’t follow your IDE argument, but it seems that the multi-project setup causes less repetition in the build configuration. So I guess the answer is simply “always” (besides some corner-cases maybe).