# Best Practice for Sub-Module Versions in Multi-Module Project

**URL:** https://discuss.gradle.org/t/best-practice-for-sub-module-versions-in-multi-module-project/44528
**Category:** Help/Discuss
**Created:** [December 23, 2022, 10:56pm UTC](https://discuss.gradle.org/t/best-practice-for-sub-module-versions-in-multi-module-project/44528 "2022-12-23T22:56:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![anon26799630](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@anon26799630](https://discuss.gradle.org/u/anon26799630)
#### Post date: [December 23, 2022, 10:56pm UTC](https://discuss.gradle.org/t/best-practice-for-sub-module-versions-in-multi-module-project/44528/1 "2022-12-23T22:56:47Z")

</div>

Coming from the world of Maven, [the official documentation](https://maven.apache.org/enforcer/enforcer-rules/reactorModuleConvergence.html) (Reactor Module Convergence) states that the following best practice should be applied to multi-module projects with regards to the project’s version:

> The best practice in Maven is that all childs inherit the version from their parent and don’t define a new version.

In the world of Gradle… what is the best practice for sub-module versions in a multi-module project? Can the versions be different from sub-module to sub-module? Should the version be the same across all sub-modules? Should all sub-modules inherit their version from a parent that controls the definition of said version?

---

<div class="post-metadata">

### Author: ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)
#### Post date: [December 24, 2022, 12:51am UTC](https://discuss.gradle.org/t/best-practice-for-sub-module-versions-in-multi-module-project/44528/2 "2022-12-24T00:51:41Z")

</div>

The versions can be different from project to project, yes.  
Whether it makes sense you have to know.  
I’m right now not aware of a best-practice in this regard.  
I personally though prefer to have the same version and usually define it in the `gradle.properties` of the root project which makes it available to all projects in the build.  
This way if you create a version tag, all projects have that tagged version and you instantly see which versions belong together.  
But that is of course just true if the projects have a strong binding.  
If they are just loosely or not-at-all coupled, the question might be why they are together in one build though.
