DependencyInsightReportTaskIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Revert "Do not emit deprecation warning for deprecated 'force'"

This reverts commit 1db54192db6ef9af5c2fd6b227004eed9a27c07f.

    • -0
    • +2
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 10 more files in changeset.
Do not emit deprecation warning for deprecated 'force'

Nagging for this deprecation will only start with 6.1 to ease

the migration from 'force' to 'strictly'.

    • -2
    • +0
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 10 more files in changeset.
Improve error message when build fails because of missing metadata

Gradle 6.0 removed the "artifact" metadata source by default.

This means that if a module is published _only_ with an artifact,

previous version of Gradle would find it, but 6.0 would fail with

a module missing exception.

The problem is that it's hard to realize that the issue comes

from the change of this default artifact sources.

This commit tries to improve the situation by recognizing that

a failure is related to not finding metadata, and in this case

would suggest that if the metadata is missing, it is still

possible that the jar is present.

The drawback of this approach is that we're unsure: if, for

some reason, the module is _really_ absent, then we gave a

wrong advice. This means, in particular, in case of wrong

coordinates.

    • -0
    • +2
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 12 more files in changeset.
Deprecated `force` on first-level dependencies

This commit deprecates using `force` in favor of using the

new "strictly" behavior. The "force" flag is still used

internally, in particular in case of virtual platforms, but

its usage should be discouraged as we have a solution which

is better now.

    • -0
    • +2
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 23 more files in changeset.
Adjust tests and samples to new metadata sources defaults

    • -6
    • +0
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 95 more files in changeset.
Rename format attribute and clean up values

Attribute is now org.gradle.libraryelements and only applied

to variants having the org.gradle.category at library.

This means that values related to platforms or document in the

former format attribute are removed.

    • -133
    • +133
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 46 more files in changeset.
Exclude deprecated configurations from reports

    • -0
    • +1
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 7 more files in changeset.
Remove utilisation of *-jars usage values

    • -5
    • +60
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 55 more files in changeset.
Let dependency (insight) report tests not use deprecated configurations

    • -42
    • +52
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 1 more file in changeset.
Sort module selectors

This commit reworks module selectors so that they are sorted

in an order which reduces the cost of module selection. We

make sure to put local (project) selectors first, then we

use selectors from locks (if any).

The next selectors are "latest" version selectors because

even if they are dynamic, they are likely to "win" selection.

Then, exact version selectors are sorted by version descending

, and last we add dynamic version selectors.

    • -6
    • +6
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 19 more files in changeset.
Partial ordering of module selectors

With this commit, we do a partial sort on the selectors, where we place

the dynamic selectors at the end compared to the other ones.

This allows a more efficient resolution in some corner cases but is

mostly preparation work for follow up changes.

    • -1
    • +1
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 7 more files in changeset.
Update Category attribute to be typed

Adapt code to new typed attributes, dealing with coercible String values

when parsed from metadata and typed values when created inside a Gradle

build.

    • -0
    • +5
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 27 more files in changeset.
Rename category attribute

Attribute is now `org.gradle.category` and the constant is named

VARIANT_CATEGORY.

The removal of the "component" part of the name was to clarify to what

the category applies.

    • -101
    • +101
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 26 more files in changeset.
Fix rebase glitches

    • -2
    • +2
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 7 more files in changeset.
To avoid confusion, remove mention of "platform" from "target Java platform"

We already have the "Java Platform" plugin which is something quite

different from the concept we want to express when using "target java platform".

This is more often known as the "JVM version", or "target Java version". We

use "JVM" because this is not specific to Java.

    • -28
    • +28
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 25 more files in changeset.
Add bundling attribute on configurations

In the Java ecosystem, resolvable configurations now declare that they

require the bundling attribute valued as external.

Issue #8380

    • -64
    • +126
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 8 more files in changeset.
Rename the Java target platform attribute

This is to avoid confusion: while "minimal" makes sense from

the producer point of view, it reads strange when seen from

the consumer side: the "minimal" version here can be higher

than what a producer has. So it's now simplified to "target

platform".

    • -27
    • +27
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 15 more files in changeset.
Set the target platform attribute on the consumer side

This commit sets a default value for the target platform

attribute, whenever the consumer says nothing (which should

be the case for all scripts today). The default is the same

as with compilation: use whatever `targetCompatibility` says.

    • -3
    • +25
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 5 more files in changeset.
Introduce `TargetJavaPlatform` attribute

This commit adds a new Java ecosystem attribute, corresponding

to the minimal target platform a producer supports. It's often

the case that Java libraries are published with different

classifiers for different target platforms. However, a classifier

is not enough. With this attribute, we now have a proper model

of the producer and consumer side.

By default, the producer will not ask for a specific target

platform, but will only accept those which are lower than or

equal to the current Gradle runtime version. However, if the

consumer says something, it will then select the most appropriate

variant based on the producer attributes.

In the Java world, a consumer can use Java libraries produced

for older versions of Java, but not newer versions. This rule

is baked in as the default compatibility rule. Disambiguation

will then chose the closest version.

    • -0
    • +6
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 23 more files in changeset.
Rename `DependencyPacking` -> `Bundling`

This avoids the name collision with OSGi "bundle", while

also being closer to what we want to express. It also

changes the "fatjar" value to "embedded" so that this

attribute can be used in a wider context (like, "all"

documentation).

    • -10
    • +10
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 14 more files in changeset.
Update failOnVersionConflict error message

The message now leverages the description found on the selection reason.

It will enable to report on all conflicts, like capabilites, and not

just version ones.

Issue #8428

    • -8
    • +4
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 6 more files in changeset.
Use packing attribute out ongoing Java configurations

    • -5
    • +10
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 8 more files in changeset.
Revert "Temporarily ignore failing DM tests"

This reverts commit f71ac70373f4ed3b63143c08180b5fa158a320e9.

    • -1
    • +0
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 6 more files in changeset.
Temporarily ignore failing DM tests

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -0
    • +1
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 6 more files in changeset.
Introduce a `JAVA_API_JARS` usage

This commit introduces a new `JAVA_API_JARS` usage, mirror

to the `JAVA_RUNTIME_JARS` usage. This is both for consistency,

and to make sure that the `JAVA_API` and `JAVA_RUNTIME` usages

are limited to cases where the consumer doesn't care, or when

a producer doesn't have a more specific usage to provide.

This is, for example, the case for Java platforms. It's worth

noting than in case a producer mixes both "generic" usages

and "specific" usages, selection is likely to produce unexpected

results, because of disambiguation rules.

The Java disambiguation rule has been simplified and now

supports more cases.

    • -3
    • +3
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 37 more files in changeset.
Fix disambiguation of platform/library

This commit fixes the fact that the engine will not let us

choose both the library and platform modules of a derived

POM component, because they don't have the same capabilities.

The fact they don't have the same capabilities is precisely

to allow them both to be present. However, as soon as we

have this, the `platform` keyword is not sufficient to

express the fact we allow both the implicit capability and

the implicit "derived" capability of a platform. For this

purpose we introduced the `ShadowedCapability` interface

which is _only_ used in this context.

    • -2
    • +6
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 5 more files in changeset.
Support depending on multiple variants of the same component

This commit changes the resolution engine so that it is possible

to resolve multiple variants of the same component when using

variant-aware dependency management.

Before, in order to have 2 dependencies on the same component

but using different variants, one had to use explicit configuration

dependencies. Now, with this change, it is possible to have

two dependencies on the same component, but with different attributes.

Those components would resolve to different variants.

Special treatment is applied when attributes are declared on constraints:

in this case, we _merge_ the constraint attributes, and make sure that

the edge is computed using the merged attributes. Should they be

incompatible, the build would fail as before.

    • -1
    • +4
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 29 more files in changeset.
spelling: superseded

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

    • -2
    • +2
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 1 more file in changeset.
spelling: doesn't

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Signed-off-by: Bo Zhang <bo@gradle.com>

    • -1
    • +1
    ./DependencyInsightReportTaskIntegrationTest.groovy
Tweak the output produced by `TreeFormatter`.

    • -15
    • +23
    ./DependencyInsightReportTaskIntegrationTest.groovy
  1. … 36 more files in changeset.