Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Treat single version ranges as "required"

This commit changes the way Gradle handles single version

ranges to treat them like Maven does: they are effectively

"exact" version selectors (not strictly).

Fixes #11185

    • -1
    • +1
    ./MavenVersionRangeResolveIntegrationTest.groovy
  1. … 6 more files in changeset.
Fix unique snapshot consumption with GMM

Fixes #11639

    • -6
    • +17
    ./MavenSnapshotResolveIntegrationTest.groovy
  1. … 1 more file in changeset.
Rename @FailsWithInstantExecution to @ToBeFixedForInstantExecution

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

    • -6
    • +6
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
    • -6
    • +6
    ./MavenDynamicResolveIntegrationTest.groovy
    • -4
    • +4
    ./MavenFileRepoResolveIntegrationTest.groovy
    • -5
    • +5
    ./MavenHttpRepoResolveIntegrationTest.groovy
    • -10
    • +10
    ./MavenJvmLibraryArtifactResolutionIntegrationTest.groovy
    • -2
    • +2
    ./MavenLatestResolveIntegrationTest.groovy
    • -4
    • +4
    ./MavenLocalDependencyWithGradleMetadataResolutionIntegrationTest.groovy
    • -5
    • +5
    ./MavenLocalRepoResolveIntegrationTest.groovy
    • -6
    • +6
    ./MavenModuleArtifactResolutionIntegrationTest.groovy
    • -5
    • +5
    ./MavenParentPomResolveIntegrationTest.groovy
    • -3
    • +3
    ./MavenPomPackagingResolveIntegrationTest.groovy
    • -2
    • +2
    ./MavenPomRelocationIntegrationTest.groovy
    • -2
    • +2
    ./MavenPomResolveIntegrationTest.groovy
    • -2
    • +2
    ./MavenProfileResolveIntegrationTest.groovy
    • -12
    • +12
    ./MavenRemoteDependencyWithGradleMetadataResolutionIntegrationTest.groovy
  1. … 858 more files in changeset.
Merge branch 'master' into eskatos/ie/instantIntegTest-enable

    • -0
    • +30
    ./MavenLocalRepoResolveIntegrationTest.groovy
  1. … 8 more files in changeset.
Annotate integ tests failing with instant execution in various projects

removing most of @IgnoreWithInstantExecution annotations

after fixing the @FailsWithInstantExecution rule

and more ci feedback

also make @IgnoreWithInstantExecution require a reason from a fixed set

and add it to the remaining ignores

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

    • -5
    • +4
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
    • -2
    • +1
    ./MavenJvmLibraryArtifactResolutionIntegrationTest.groovy
    • -2
    • +1
    ./MavenPomPackagingResolveIntegrationTest.groovy
    • -4
    • +3
    ./MavenRemoteDependencyWithGradleMetadataResolutionIntegrationTest.groovy
    • -7
    • +6
    ./MavenSnapshotResolveIntegrationTest.groovy
  1. … 122 more files in changeset.
Add Maven local version listing test

Issue #11321

    • -0
    • +30
    ./MavenLocalRepoResolveIntegrationTest.groovy
Annotate integ tests failing with instant execution in :dependencyManagement

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

    • -0
    • +7
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
    • -0
    • +6
    ./MavenDynamicResolveIntegrationTest.groovy
    • -0
    • +4
    ./MavenFileRepoResolveIntegrationTest.groovy
    • -0
    • +5
    ./MavenHttpRepoResolveIntegrationTest.groovy
    • -0
    • +11
    ./MavenJvmLibraryArtifactResolutionIntegrationTest.groovy
    • -0
    • +2
    ./MavenLatestResolveIntegrationTest.groovy
    • -0
    • +4
    ./MavenLocalDependencyWithGradleMetadataResolutionIntegrationTest.groovy
    • -0
    • +5
    ./MavenLocalRepoResolveIntegrationTest.groovy
    • -0
    • +6
    ./MavenModuleArtifactResolutionIntegrationTest.groovy
    • -0
    • +5
    ./MavenParentPomResolveIntegrationTest.groovy
    • -0
    • +4
    ./MavenPomPackagingResolveIntegrationTest.groovy
    • -0
    • +2
    ./MavenPomRelocationIntegrationTest.groovy
    • -0
    • +2
    ./MavenPomResolveIntegrationTest.groovy
    • -0
    • +2
    ./MavenProfileResolveIntegrationTest.groovy
    • -0
    • +13
    ./MavenRemoteDependencyWithGradleMetadataResolutionIntegrationTest.groovy
  1. … 79 more files in changeset.
Fix snapshot handling with Gradle Module Metadata

This commit fixes a couple of bugs:

1. if Gradle Module Metadata was published and consumed, then

the `changing` flag for the resolved component metadata wouldn't

be set to `true`, which means that snapshot would effectively be

considered as persistent

2. the publish test fixtures were not using the right, timestamped,

version id for the metadata and artifacts in case of unique snapshots,

which caused the resolution to fallback to the POM file

In addition, this fixes the generated module metadata file which

was uploaded _without_ substution the the SNAPSHOT version with

the timestamped version when published on external repositories.

Finally, this highlighted a couple of issues with test fixtures

which were still using Gradle Module Metadata when they shouldn't.

Fixes #10916

    • -2
    • +91
    ./MavenSnapshotResolveIntegrationTest.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
    • +6
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
    • -0
    • +1
    ./MavenLocalRepoResolveIntegrationTest.groovy
    • -0
    • +1
    ./MavenRemoteDependencyWithGradleMetadataResolutionIntegrationTest.groovy
    • -0
    • +1
    ./MavenSnapshotResolveIntegrationTest.groovy
  1. … 9 more files in changeset.
Variant aware and legacy dependency setup invalid

A dependency declaration either needs to be about variant aware

dependency management with attributes and capabilities or about legacy

artifacts and configuration.

Mixing the two is now disallowed explicitly.

Issue #10532

    • -0
    • +17
    ./MavenDependencyResolveIntegrationTest.groovy
  1. … 2 more files in changeset.
Align implementations of artifact identifier display names

DefaultModuleComponentArtifactIdentifier now behaves similar as

ComponentFileArtifactIdentifier (showing the full actual file name).

This means that the artifact name used during reporting now

contains the version at the usual position in the file name.

This way it shows the actual file name for artifacts originating

from pom-only maven repositories (except snapshots, which show the

SNAPSHOT placeholder) and ivy repositories with default pattern.

The motivation for this alignment is to get the same representation for

the same file, independent of whether it was sourced from traditional

or Gradle module metadata.

    • -2
    • +2
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
    • -2
    • +2
    ./MavenDynamicResolveIntegrationTest.groovy
    • -1
    • +1
    ./MavenJvmLibraryArtifactResolutionIntegrationTest.groovy
    • -1
    • +1
    ./MavenModuleArtifactResolutionIntegrationTest.groovy
    • -1
    • +1
    ./MavenPomPackagingResolveIntegrationTest.groovy
    • -2
    • +2
    ./MavenSnapshotResolveIntegrationTest.groovy
  1. … 27 more files in changeset.
Module test fixture: add 'category' attribute to api/runtime variants

This reflects the default variant attributes of a published

java component.

    • -1
    • +1
    ./MavenGradleMetadataRedirectionIntegrationTest.groovy
  1. … 13 more files in changeset.
Adjust tests and samples to new metadata sources defaults

    • -6
    • +1
    ./BadPomFileResolveIntegrationTest.groovy
    • -2
    • +0
    ./ClassifierToVariantResolveIntegrationTest.groovy
    • -13
    • +0
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
    • -6
    • +19
    ./MavenDynamicResolveIntegrationTest.groovy
    • -2
    • +2
    ./MavenGradleMetadataRedirectionIntegrationTest.groovy
    • -6
    • +2
    ./MavenHttpRepoResolveIntegrationTest.groovy
    • -6
    • +2
    ./MavenJvmLibraryArtifactResolutionIntegrationTest.groovy
    • -3
    • +2
    ./MavenLocalDependencyWithGradleMetadataResolutionIntegrationTest.groovy
    • -1
    • +0
    ./MavenLocalRepoResolveIntegrationTest.groovy
    • -1
    • +9
    ./MavenModuleArtifactResolutionIntegrationTest.groovy
    • -3
    • +0
    ./MavenParentPomResolveIntegrationTest.groovy
    • -1
    • +0
    ./MavenPomPackagingResolveIntegrationTest.groovy
    • -1
    • +0
    ./MavenPomRelocationIntegrationTest.groovy
    • -10
    • +19
    ./MavenRemoteDependencyWithGradleMetadataResolutionIntegrationTest.groovy
    • -4
    • +0
    ./MavenSnapshotResolveIntegrationTest.groovy
  1. … 81 more files in changeset.
MetadataSources: Introduce ignoreGradleMetadataRedirection to prevent gradle metadata redirection when marker is present in POM or Ivy descriptor

Signed-off-by: Roberto Perez Alcolea <rperezalcolea@netflix.com>

    • -3
    • +44
    ./MavenGradleMetadataRedirectionIntegrationTest.groovy
  1. … 8 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.

    • -2
    • +2
    ./MavenBomResolveIntegrationTest.groovy
    • -1
    • +1
    ./MavenGradleMetadataRedirectionIntegrationTest.groovy
  1. … 45 more files in changeset.
Remove utilisation of *-jars usage values

    • -20
    • +20
    ./ClassifierToVariantResolveIntegrationTest.groovy
    • -2
    • +2
    ./MavenBomResolveIntegrationTest.groovy
    • -1
    • +1
    ./MavenGradleMetadataRedirectionIntegrationTest.groovy
  1. … 53 more files in changeset.
Let dependency-management tests not use deprecated configurations

    • -1
    • +1
    ./MavenBomResolveIntegrationTest.groovy
    • -1
    • +1
    ./MavenLocalDependencyWithGradleMetadataResolutionIntegrationTest.groovy
    • -1
    • +1
    ./MavenProfileResolveIntegrationTest.groovy
    • -1
    • +1
    ./MavenRealProjectsDependencyResolveIntegrationTest.groovy
    • -1
    • +1
    ./MavenRemoteDependencyWithGradleMetadataResolutionIntegrationTest.groovy
    • -8
    • +8
    ./MavenScopesAndProjectDependencySubstitutionIntegrationTest.groovy
    • -2
    • +2
    ./MavenSnapshotResolveIntegrationTest.groovy
    • -5
    • +5
    ./MavenVersionRangeResolveIntegrationTest.groovy
  1. … 20 more files 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.

    • -1
    • +1
    ./MavenRealProjectsDependencyResolveIntegrationTest.groovy
  1. … 19 more files in changeset.
Implement classifier to variant mapping

This commit implements a strategy to disambiguate

variants whenever the consumer uses a classifier

in the dependency descriptor. This can be the case

if a Maven library depends on a Gradle library published

with Gradle module metadata, or even if a Gradle

library depends on another Gradle library but makes

use of a classifier (when it should really be using an

attribute).

    • -0
    • +147
    ./ClassifierToVariantResolveIntegrationTest.groovy
  1. … 9 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.

    • -2
    • +2
    ./MavenBomResolveIntegrationTest.groovy
  1. … 26 more files in changeset.
Add configuration capabilities to Maven local repo

Some of the configuration capabilities were not available for maven

local repository.

This change adds the ability to configure this repository, including

the content filtering aspect.

Fixes #8191

    • -1
    • +5
    ./MavenLocalRepoResolveIntegrationTest.groovy
  1. … 3 more files in changeset.
Proper propagation of flag when modifying metadata

The `ConfigurationBoundExternalDependencyMetadata` was not properly

propagating the `alwaysUseAttributeMatching` state when the metadata was

modified.

This caused legacy Maven / Ivy interop to kick in, as happened before Maven

was fully moved to variant aware dependency management. One test needed

to be modified, which in reality should have been changed at the 5.0

release.

Fixes #8586

    • -8
    • +8
    ./MixedMavenAndIvyModulesIntegrationTest.groovy
  1. … 1 more file in changeset.
Fix tests for Gradle metadata 1.0

- Fix cross version test runtime classpath

- Remove test which is no longer true now that parsing is lenient

    • -41
    • +0
    ./MavenRemoteDependencyWithGradleMetadataResolutionIntegrationTest.groovy
  1. … 1 more file in changeset.
Rename writer/parser classes for consistency

    • -1
    • +1
    ./MavenLocalDependencyWithGradleMetadataResolutionIntegrationTest.groovy
    • -1
    • +1
    ./MavenRemoteDependencyWithGradleMetadataResolutionIntegrationTest.groovy
  1. … 20 more files in changeset.
Minor tweaks to tests

    • -1
    • +1
    ./MavenDependencyResolveIntegrationTest.groovy
    • -2
    • +2
    ./MavenGradleMetadataRedirectionIntegrationTest.groovy
  1. … 1 more file in changeset.
Revert "Temporarily ignore failing DM tests"

This reverts commit f71ac70373f4ed3b63143c08180b5fa158a320e9.

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

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

    • -0
    • +7
    ./MavenBomResolveIntegrationTest.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.

    • -1
    • +1
    ./MavenGradleMetadataRedirectionIntegrationTest.groovy
  1. … 37 more files in changeset.
Allow selection of both the library and platform of a component

For published POM files, we want to allow selecting both the

library and platform variants of a component. They are effectively

different things. This commit makes it possible by assigning a

different capability to the platform variants.

Fixes #8420

    • -5
    • +11
    ./MavenBomResolveIntegrationTest.groovy
  1. … 2 more files in changeset.
Implement Gradle metadata marker in published pom/ivy files

This commit implements a performance optimization for Gradle metadata.

Given that today there's no library published in any repository with

Gradle metadata, it's much more likely to find a POM (or Ivy) metadata

file for an external dependency, rather than a Gradle metadata file.

If we decided to add `gradleMetadata()` sources by default to all

repositories, then we would probably introduce a performance regression

to a lot of builds, because we would first try to get Gradle metadata,

then fail, and search for POM/Ivy files.

To avoid this, whenever a library is going to be published with Gradle

metadata, we will introduce a _marker_ in the published POM or Ivy

file. When Gradle _resolves_ such a dependency, it will parse the POM

file and look for the marker. If it finds it, then it will _redirect_

to use Gradle metadata instead. This means that when Gradle metadata is

present, we will pay the price of looking for a POM or Ivy file first,

start parsing, only to discover we should parse Gradle metadata. This

should be ok in the beginning, knowing that if `gradleMetadata()` is

added, then we would systematically look at Gradle metadata first.

This means that this is a _temporary_ solution, until Gradle metadata

becomes widespread. So "temporary" should be understood as several

months, if not years.

The marker introduced in POM and Ivy files is _neutral_ for both Ivy

and Maven. By this we mean that it uses an XML comment. While not super

nice, we couldn't use a custom namespace because both Ivy and Maven

fail when parsing this. Properties were considered too, but Ivy doesn't

support them so for consistency both models use comments.

It's worth noting that we will still _completely parse_ the POM or Ivy

descriptor. It's a waste of time, but it helps in case we find a marker

but that for some reason the Gradle metadata file is absent. In this

case we fallback on the model we found.

This change also introduces a change in the semantics of the incubating

metadata sources API: those should be considered _hints_, and not strong

statements anymore.

Finally, should a producer want to avoid publishing Gradle metadata,

it's now possible to disable the task that creates the metadata file.

    • -1
    • +1
    ./MavenDependencyResolveIntegrationTest.groovy
    • -0
    • +136
    ./MavenGradleMetadataRedirectionIntegrationTest.groovy
  1. … 56 more files in changeset.