Skip to content

Migrate publishing to use Gradle Variants #15

Description

@alexander-yevsyukov

Currently publishing of the cli module deals with the notion of artifacts. In relation to this the Gradle documentation says:

Gradle’s dependency management engine is known as variant aware. ... In addition, selecting a different artifact for a component (for example, using the jdk7 artifact) is cumbersome as it requires the use of classifiers. One issue with this model is that it cannot guarantee global graph consistency because there are no common semantics associated with classifiers. What this means is that there’s nothing which prevents from having both the jdk7 and jdk8 versions of a single module on classpath, because the engine has no idea what semantics are associated with the classifier name.

Gradle, in addition to the concept of a module published at GAV coordinates, introduces the concept of variants of this module. Variants correspond to the different "views" of a component that is published at the same GAV coordinates. In the Gradle model, artifacts are attached to variants, not modules

It would be good to have CLI published as variants, rather than artifacts. Hopefully, it would simplify the build logic “gymnastics” around the artifacts that we have now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions