Skip to content

Conversation

@souvlakias
Copy link
Contributor

@souvlakias souvlakias commented Oct 23, 2025

This an experiment on making AndroidModule a CrossModule, in order to have debug and release variants. Ref

Thoughts

  • Build.mill is a bit more complex for the user this way
  • Since this is just for experimentation, androidIsDebug remains and returns true/false according to crossValue

Example:

image

@souvlakias
Copy link
Contributor Author

@lefou, does this implentation look good to you, or should we maybe go for the submodule approach instead?

@lefou
Copy link
Member

lefou commented Oct 24, 2025

We should not weave the CrossModule nature into the AndroidModule, since it tightens the way how users can design their builds.

As said before, it think it should feel more convenient for the user to model dev/prod builds via sub-modules, since dev-builds typically need less stuff to set up (e.g. no publishing, insecure signing, less optimizations) and a cross-module will require all machinery already set-up for each cross-value, while a sub-module can easily mix-in more traits only if needed. With sub-modules, it's also easier to have multiple prod-builds targeting different destinations or platforms.

For users who prefer to use a cross-module, we could provide dedicated traits, as we do with ScalaCrossModule.

@souvlakias souvlakias closed this Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants