versionmapping

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix resolved versions of substituted dependencies

This commit fixes an inconsistency when publishing resolved

versions of a component. If that component happens to be

substituted, which would be strange for a first level dependency

but nevertheless possible, then we wouldn't find the target

module in the resolution result, and the outcome would be that

POM/IVY/Gradle Module metadata files would all have an empty

version for a substituted dependency.

With the change, we will now also look for dependencies in

the resolution result, and if one matches the original dependency

coordinates, then we use its resolved component as the result.

This allows us to _substitute_ the result with complete coordinates

in the metadata files.

Fixes nebula-plugins/gradle-nebula-integration#62

    • -68
    • +0
    ./DefaultVariantVersionMappingStrategy.java
    • -122
    • +0
    ./DefaultVersionMappingStrategy.java
  1. … 11 more files in changeset.
Fix resolved versions of substituted dependencies

This commit fixes an inconsistency when publishing resolved

versions of a component. If that component happens to be

substituted, which would be strange for a first level dependency

but nevertheless possible, then we wouldn't find the target

module in the resolution result, and the outcome would be that

POM/IVY/Gradle Module metadata files would all have an empty

version for a substituted dependency.

With the change, we will now also look for dependencies in

the resolution result, and if one matches the original dependency

coordinates, then we use its resolved component as the result.

This allows us to _substitute_ the result with complete coordinates

in the metadata files.

Fixes nebula-plugins/gradle-nebula-integration#62

    • -68
    • +0
    ./DefaultVariantVersionMappingStrategy.java
    • -122
    • +0
    ./DefaultVersionMappingStrategy.java
  1. … 11 more files in changeset.
Fix resolved versions of substituted dependencies

This commit fixes an inconsistency when publishing resolved

versions of a component. If that component happens to be

substituted, which would be strange for a first level dependency

but nevertheless possible, then we wouldn't find the target

module in the resolution result, and the outcome would be that

POM/IVY/Gradle Module metadata files would all have an empty

version for a substituted dependency.

With the change, we will now also look for dependencies in

the resolution result, and if one matches the original dependency

coordinates, then we use its resolved component as the result.

This allows us to _substitute_ the result with complete coordinates

in the metadata files.

Fixes nebula-plugins/gradle-nebula-integration#62

    • -68
    • +0
    ./DefaultVariantVersionMappingStrategy.java
    • -122
    • +0
    ./DefaultVersionMappingStrategy.java
  1. … 11 more files in changeset.
Transition some static methods to a global service, so the implementation can be contextualized.

  1. … 12 more files in changeset.
Transition some static methods to a global service, so the implementation can be contextualized.

  1. … 12 more files in changeset.
Transition some static methods to a global service, so the implementation can be contextualized.

  1. … 12 more files in changeset.
Transition some static methods to a global service, so the implementation can be contextualized.

  1. … 11 more files in changeset.
Fix version mapping backward compatiblity

This commit reworks how the default configurations are used

whenever mapping to resolved versions. Because of the

introduction of `JAVA_API_JARS`, any previous code which was

using `JAVA_API` in a version mapping block wouldn't match

anymore, because the outgoing variants are now using the

attributes from the configuration instead of the ones hard-coded.

So now we're using the attributes schema to find the most

appropriate mapping strategy, and use a dedicated path to set

the default value.

    • -17
    • +62
    ./DefaultVersionMappingStrategy.java
    • -37
    • +0
    ./PublishedVariantVersionMapping.java
  1. … 5 more files in changeset.
Deprecate `JavaLibrary` in favor of public API

This commit makes use of the newly introduced software component

factory to support publishing of Java components using a public

API only.

There are a few consequences to this change, mostly around Gradle

metadata:

- variants `api` and `runtime` are now named `apiElements` and

`runtimeElements`

- it is no longer possible to warn the user when publishing a

variant without capability. This might change later if we decide

to _always_ publish capabilities (and optimize on read)

  1. … 20 more files in changeset.
Replace the named variant methods with an `allVariants` one

Because variant names are unstable.

  1. … 2 more files in changeset.
Add support for resolved versions in dependency constraints

This commit adds handling of resolved versions in dependency

constraints. By default, the version used during publishing

is untouched if the constraint is just declared and doesn't

participate in dependency resolution. If the constraint applies,

then we use the resolved version.

    • -11
    • +5
    ./DefaultVariantVersionMappingStrategy.java
  1. … 4 more files in changeset.
Add support for publishing resolved versions of dependencies

This commit adds support for using the resolved versions of

dependencies when publishing with the `maven-publish` plugin.

There are currently only 2 formats supported:

1. POM files, in which case the declared version is replaced with

the resolved version in the <dependency> block

2. Gradle metadata, in which case we add an additional property

to the `json` file, the `resolved` property. This property is NOT

used when resolving, yet.

    • -0
    • +74
    ./DefaultVariantVersionMappingStrategy.java
    • -0
    • +80
    ./DefaultVersionMappingStrategy.java
    • -0
    • +28
    ./PublishedVariant.java
    • -0
    • +36
    ./PublishedVariantVersionMapping.java
  1. … 23 more files in changeset.