This message was deleted.
# community-support
s
This message was deleted.
j
versioning depends on your needs, but it is usual to share the same version like retrofit does for example. About hyphens, yeah, you should, I think you can even have issues with project accessor generator if you use camel case
🙏🏻 1
g
By retrofit, you mean I could copy this: https://github.com/square/retrofit
j
It is an example about how they are publishing a multimodule project sharing the same version and how they name their groups
you can follow it as reference
✔️ 1
f
Managing different projects in the same repository is not a good idea because it means that you end up violating the package principles. The example @Javi gave (retrofit) does not violate them, because they build one project with several artifacts/modules but they always go together. Based on your project description it does not sound as if these libraries have the same lifecycle, thus, they should be packaged and released separately. This has nothing to do with Gradle, as Gradle will happily violate the packaging principles (it is not the build tools place to have an opinion on this, and there can be good reasons to violate them [e.g. monorepos where packages are ever only used as latest]).
The Wikipedia article is a little thin on this matter, but still a starting point: https://en.wikipedia.org/wiki/Package_principles
g
These repos are generally used together, in various small groupings, or all together.
f
If they go together then managing them together is of course the best course of action, and also exactly what the package principles want us to do. You should then also definitely version them together and put them in the same group. Also check out https://docs.gradle.org/current/userguide/platforms.html (aka. BOMs in the Maven world) to ensure that they are always aligned to each other. This will also allow users to use the platform and specify the version once for all dependencies, instead of individually:
Copy code
dependencies {
  implementation(platform("glen-petersons-awesome-libs:platform:1.2.3"))
  implementation("glen-ptersons-awesome-libs:a")
  implementation("glen-ptersons-awesome-libs:b")
  implementation("glen-ptersons-awesome-libs:c")
}
Do not forget to reference the platform in each library to ensure that they always align with each other, so that if a user does the following everything still works as expected:
Copy code
dependencies {
  implementation("glen-ptersons-awesome-libs:a:1.0.0") // references glen-petersons-awesome-libs:platform:1.0.0
  implementation("glen-ptersons-awesome-libs:b:2.0.0") // references glen-petersons-awesome-libs:platform:2.0.0
  implementation("glen-ptersons-awesome-libs:c:3.0.0") // references glen-petersons-awesome-libs:platform:3.0.0
}
This forces Gradle to use
3.0.0
for all of them. Spring and Spring Boot are also good examples of projects where all of this is done right. 🙂
🙏🏻 1