Category: bitbucket

How to build a multi-component app in Gradle without uploading each component to Maven each time it’s updated. On one hand, it makes sense to create a separate Git repository (and a separate Gradle project) for each library and for the app itself.

I will create 3 Git repositories: one for the ‘app’, one for the ‘lib’, and the third one (‘parent’) to unite both ‘app’ and ‘lib’ under one roof.

Now the ‘parent’ repository contains ‘lib’ and ‘app’ subdirectories with the content of ‘lib’ and ‘app’ repositories correspondingly.20-parent-repository-toc724×529 39.5 KB Clone the ‘parent’ repository: Now create the settings.gradle file with the following content: It will tell Gradle to build ‘lib’ from sources instead of getting the corresponding artefact from Maven.

Any change to “lib/” and “app/” subdirectories of the parent will be automatically synchronized with ‘lib’ and ‘app’ repositories by the Git X-Modules app.

Related Articles