Description
Is your feature request related to a problem? Please describe.
When using scala-cli in companies that require custom Artifactory repositories, it is kind of cumbersome to define these repositories (sometimes two or three very long strings because they encode the maven/ivy patterns) because one either needs to:
- Define them with
using
on all Scala files in the build; or, - Add them in every
scala-cli
invocation3.
Both of those require lots of ceremony and are a bit annoying. Can we have a better way of doing this?
Describe the solution you'd like
There are different ways of getting around this, but one quickly figures out that what I'm asking for is some kind of build-wide configuration mechanism. I realize that having the build configuration be in Scala source files is very much intentional and I like to think of that as one of the main defining aspects of scala-cli. Thus, I think there are two approaches that would be best:
- Define .scala-cli-config that allows you to pass in default scala-cli arguments that will always be picked up by scala-cli
- Allow to use
//> using
comments in a Scala file calledbuild-defaults.scala
where people can addusing
defaults
This way, I would add the repository information to either of those places and I'd be able to avoid them everywhere else. This can also help defining defaults that need to be used build-wide that are not related to dependency resolution.
Additional context
I believe having something like this would make scala-cli much more appealing and easier to use in companies/enterprises, where the use of internal repositories is common.