Skip to content

Multimodule setup issues #6

@aartigao

Description

@aartigao

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions