-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement publishing to Bintray (#77)
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 configuration file. With the new CLI command `publish`, modules can be published to a repository. 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](https://bintray.com/docs/api/). The newly-introduced CLI command `doc` runs Scaladoc on the supplied modules 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 patch artefacts 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 build files, 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.
Showing
45 changed files
with
3,139 additions
and
684 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
#!/bin/sh | ||
set -e | ||
set -x | ||
|
||
version=$1 | ||
|
||
/usr/bin/git tag -f $version | ||
|
Oops, something went wrong.