Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This introduces two user-facing features: the ability to publish and
document modules. The changes resulted in the stabilisation of the
artefact resolution and progress bar logic. Furthermore, the
import
keyword is now available in the global Seed configurationfile.
With the new CLI command
publish
, modules can be published to arepository. It builds, packages and uploads the specified modules.
At the moment, only Maven-style Bintray repositories are supported.
For each supplied module, JAR artefacts along with a POM file are
created. These artefacts contain the compiled classes, source files
and documentation. Publishing of sources and documentation is
optional and can be disabled. Progress bars are shown when
publishing modules. Unless specified, Seed will attempt to read the
version from the project's Git repository. Internally, the feature
uses the Apache HTTP client, wrapped as a ZIO task, and sends
requests to the Bintray REST API.
The newly-introduced CLI command
doc
runs Scaladoc on the suppliedmodules and generates an HTML documentation for them. Seed runs the
Scala compiler directly, bypassing Bloop. This results in an
additional compilation pass. Compiler bridges are provided for Scala
2.11, 2.12 and 2.13. However, the actual resolution of the
scala-compiler
artefact occurs during runtime. Therefore,documentation generation is compatible with alternative compilers
such as Typelevel Scala.
The aforementioned features required changes to the artefact
resolution. Previously, all dependencies were resolved at once.
However, modular projects are likely to contain libraries with
diverging versions. A resolution pass in Coursier merges these
duplicate libraries, only retaining the latest version. This may
lead to unexpected compile- and runtime behaviour. The new
resolution logic solves this limitation by performing a separate
resolution pass for each module. Test modules are resolved
separately too. As a consequence of these changes, the resolution is
slightly slower, but still acceptable on larger projects.
A further change is that the standard library's organisation and
version are forcibly set during dependency resolution by using
Coursier's
ResolutionParams
feature. This avoids having to patchartefacts later on, e.g. during generation.
The progress bar logic was refactored and several bugs were fixed.
Notably, as build targets may run asynchronously, they can produce
output while the project is still compiling. In this case, the
progress bar output would get corrupted. The graphical glitch was
resolved by using the console output's logger in
seed.cli.BuildTarget.buildTargets()
.Finally, the
import
keyword, previously only available in buildfiles, can now be used within the global Seed configuration. Since
Bintray repository credentials are part of this file, users may want
to move the credentials to a custom file and import it instead.