Add support for publishing libraries using the `maven-publish` plugin
This commit adds support for API dependencies in the generated pom file when using the `maven-publish` plugin.
It refactors the `Usage` class to make it public, and extensible by users. Then the legacy internal `Usage` class,
which was only used by the publishing plugin, has been updated to use `Usage` as a member, instead of being directly
the usage. This allows us to map configurations to usages more precisely.
- The `compile` scope of the generated pom file consists of the `api` dependencies.
- The `runtime` scope of the generated pom file consists of the old `runtime` dependencies *and* `runtimeElements` dependencies
With this setup, the new publishing plugin is now closer to the reality than the old Maven publishing plugin.
06 Dec 16 809f6ba5793a7e9a5ce241c154d4b73e8d502019
Add support for publishing Java libraries with Maven
This commit makes sure that Java projects and Java libraries can be published using the `maven` plugin. As the project is built with Gradle,
we only need to add additional mappings for the `implementation`, `api` and `testImplementation` configurations, because the other configurations
only make sense when building, not consuming.
Those are mapped to the following Maven scopes:
- `api` is mapped to `compile`
- `implementation` is mapped to `runtime`
- `testImplementation` is mapped to `test`
The `compileOnly` and `runtimeOnly` dependency buckets are only used from within a project, so should not appear in the generated pom file.
06 Dec 16 d9fd76331a3cb70fd1cf5e85ce67ac4348574643