Hi! I'm wondering if it's possible in a multimodule setup to either:
- Define a global configuration for all the modules
- Define an override configuration for some of the submodules
I've tried multiple ways (scoping by ThisBuild, scoping by Global, with settings at submodule level...) and I ran out of ideas 😢
What happens if I try to use a different versionPolicy for the submodules is that the last one defined wins, meaning all the other subprojects inherit the version from it. I guess this is due to how plugin is configured to set version in ThisBuild. I've created locally a version of the plugin that scopes all the settings to Global but the issue persists. However with all settings in Global I'm able to define a global configuration at top level in build.sbt like:
ThisBuild / initialVersion := "0.0.0"
ThisBuild / versionPolicy := Seq(
exact("master") -> currentTag(),
exact("develop") -> nextMinor(),
prefix("release/") -> matching(),
any -> nextMinor()
)
Before digging too much on it, because I'm really confused about SBT scopes/axis, is there a way to accomplish what I want? I'm more than happy to contribute a PR if needed.
Hi! I'm wondering if it's possible in a multimodule setup to either:
I've tried multiple ways (scoping by
ThisBuild, scoping byGlobal, with settings at submodule level...) and I ran out of ideas 😢What happens if I try to use a different
versionPolicyfor the submodules is that the last one defined wins, meaning all the other subprojects inherit the version from it. I guess this is due to how plugin is configured to setversion in ThisBuild. I've created locally a version of the plugin that scopes all the settings toGlobalbut the issue persists. However with all settings inGlobalI'm able to define a global configuration at top level inbuild.sbtlike:Before digging too much on it, because I'm really confused about SBT scopes/axis, is there a way to accomplish what I want? I'm more than happy to contribute a PR if needed.