Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
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

    • -4
    • +4
    ./integtests/publish/ivy/IvyPublishResolvedVersionsJavaIntegTest.groovy
  1. … 9 more files in changeset.
Remove use of deprecated API

Remove use of deprecated APIs in PluginBuilder

Replace use of archiveName with archiveFileName

Avoid more deprecated APIs

    • -1
    • +1
    ./api/publish/ivy/IvyPublishArtifactCustomizationIntegTest.groovy
    • -6
    • +6
    ./integtests/publish/ivy/IvySingleProjectPublishIntegrationTest.groovy
  1. … 61 more files in changeset.
Make Javadoc and sources primary variants without dependencies

  1. … 15 more files in changeset.
Update 'complete example' section in ivy publishing chapter

  1. … 6 more files in changeset.
Warn on publication of non transitive variant

This is effectively not supported in any of the published format.

  1. … 2 more files in changeset.
Add validation at publication time

This commit introduces validation when generating Gradle

Module Metadata:

- check that there's at least one variant published

- each variant must have at least one attribute

- there shouldn't be duplicate variant names

- each variant must have a different (attributes,capabilities)

combination

Closes #10736

    • -15
    • +217
    ./api/publish/ivy/IvyGradleModuleMetadataPublishIntegrationTest.groovy
  1. … 10 more files in changeset.
Rename inheritStrictVersions() -> endorseStrictVersions() (#10755)

This name change more clearly communicates the semantics of the

feature from a users point of view.

This commit also removes all mentions of 'inheriting' AND 'forSubgraph'.

There have been some leftovers in documentation/comments that

would have been misleading in the future. To make sure we catch all,

this also updates all variable/method/package names.

    • -3
    • +3
    ./api/publish/ivy/IvyGradleModuleMetadataPublishIntegrationTest.groovy
  1. … 70 more files in changeset.
Merge pull request #10510 from gradle/jjohannes/modifiy-variants-of-components

Allow modifications to variants of components for publishing

  1. … 2 more files in changeset.
Use instantiator for DSL objects created through SoftwareComponentFactory

To have a better and consistent DSL experience when using:

component.addVariantsFromConfiguration(...) { ... }

component.withVariantsFromConfiguration(...) { ... }

  1. … 9 more files in changeset.
Document ability to suppress publication warnings

* Includes a rename from silence* to suppress* as used in other APIs,

including @SuppressWarnings

Fixes #10467

  1. … 10 more files in changeset.
Tweaks in metadata warnings headers and footers

  1. … 4 more files in changeset.
Rename API for silencing publication warnings

* New name indicates better that these warnings are about the non Gradle

metadata formats.

  1. … 5 more files in changeset.
Improve publication warning message

* Clarify this impacts POM and Ivy format, not Gradle Module Metadata

* Clean up tests

  1. … 4 more files in changeset.
Updates to terminology for clarity

- `inheritStrictConstraints` -> `inheritStrictVersions`

- `notInheritStrictConstraints` -> `doNotInheritStrictVersions`

    • -3
    • +3
    ./api/publish/ivy/IvyGradleModuleMetadataPublishIntegrationTest.groovy
  1. … 31 more files in changeset.
Rework `forSubgraph` as implied by `strictly`

This commit removes a dedicated `forSubgraph` flag

on version constraints, so that it is _implied_ by

strict version constraints. This simplifies the behavior

of `strictly`, making it closer to the intuitive semantics,

while maintaining the ability to fail the build if a

consumer brings an incompatible version in the graph.

As a consequence, _strict dependencies_ now express that

the producer preference overrides whatever is found in

its own dependency graph. It is closer to the "nearest

first" semantics of Maven, while not having its drawbacks

(ordering in particular).

    • -13
    • +10
    ./api/publish/ivy/IvyGradleModuleMetadataPublishIntegrationTest.groovy
  1. … 77 more files in changeset.
Merge branch 'feature/JLL/depricate_http_download_dependencies' of https://github.com/JLLeitschuh/gradle

* 'feature/JLL/depricate_http_download_dependencies' of https://github.com/JLLeitschuh/gradle:

Fix failing tests from insecure HTTP deprecation changes

Fix failing tests from insecure HTTP deprecation changes

Fix DefaultFlatDirArtifactRepositoryTest

Refactor HTTP deprecation logic to use HttpRedirectVerifier

Add link to medium publication about industry wide MITM

Update `@since` for new API's to be since 6.0

Disable HTTP support for TextResources in redirects by default

Fix newly added API's to use `@since 5.7`

Revert "Revert "Merge remote-tracking branch 'origin/sg/merges/pr-9419'""

  1. … 11 more files in changeset.
Add API for silencing publication warnings

* API is per variant or all warnings

Fixes #9378

Fixes #10431

  1. … 6 more files in changeset.
Rework publication compatibility warnings

* Group by variant

* Isolate variant level warnings

Issue #9378

  1. … 5 more files in changeset.
Add AdhocSoftwareComponent.withVariantsFromConfiguration() API

  1. … 8 more files in changeset.
Add test coverage for publishing option features to ivy repositories

Inspired by the same test cases we have for publishing to maven

repositories.

    • -0
    • +67
    ./api/publish/ivy/AbstractIvyPublishFeaturesJavaIntegTest.groovy
    • -0
    • +411
    ./api/publish/ivy/IvyPublishFeaturesJavaIntegTest.groovy
    • -0
    • +143
    ./api/publish/ivy/IvyPublishFeaturesJavaPluginIntegTest.groovy
  1. … 1 more file in changeset.
Add test coverage for artifact selectors in GMM

    • -0
    • +70
    ./api/publish/ivy/IvyPublishArtifactCustomizationIntegTest.groovy
  1. … 8 more files in changeset.
Adjust documentation to remove mention to uploadArchives

There are a number of exceptions:

- documentation of legacy plugins, in which case the docs have been

updated to say they are deprecated

- documentation of plugins related to deprecated behavior (eg, signing)

    • -42
    • +0
    ./integtests/publish/ivy/SamplesIvyPublishIntegrationTest.groovy
  1. … 17 more files in changeset.
Add test coverage for previously broken ivy publishing scnearios

    • -0
    • +35
    ./integtests/publish/ivy/IvyPublishResolvedVersionsJavaIntegTest.groovy
Clean up test code

Clean up IvyPublication and publish more information to ivy.xml metadata

This cleans up the implementation of `populateFromComponent()` and

introduces the following changes that publish information which

was lossy before:

- Artifacts are now added to all configurations they belong to and

not just the first found

- Dependencies are now added for all configurations they belong to,

with the corresponding mapping and version, and

not just for the first found

- For a Java library, this means the 'runtime' now represents the full

runtime variant of the library (before, only 'default' represented

that)

    • -1
    • +1
    ./api/publish/ivy/IvyPublishDescriptorCustomizationIntegTest.groovy
    • -4
    • +4
    ./integtests/publish/ivy/IvyPublishResolvedVersionsJavaIntegTest.groovy
  1. … 12 more files in changeset.
Deprecate the maven/ivy plugins

This commit introduces a deprecation warning for the `maven` plugin.

Because there's no such thing as an `ivy` plugin, we also deprecate

the _use_ of the `uploadArchives` task, which corresponds to uploading

with `ivy`, but is defined in the `base` plugin that we cannot

deprecate.

    • -0
    • +3
    ./integtests/publish/ivy/IvyLocalPublishIntegrationTest.groovy
  1. … 14 more files in changeset.
Merge remote-tracking branch 'origin/release'

* origin/release:

Fix resolving `DirectoryTee` elements of a `FileCollection`.

Avoid sharing the same id for the deprecated classloader as the real classloader

Recognize contributor

enhanced test source folder detection for eclipse task. (#10320)

Turn 'multiple publications with same coordinates' error into warning

Override getResources in DefaultDeprecatedClassLoader

Update default scan plugin version to 2.4.1

  1. … 4 more files in changeset.
Turn 'multiple publications with same coordinates' error into warning

This reduces the severity of the error detection introduced in #9466.

Although this situation is technically an error that should be avoided

as it causes information loss in the published result, in some testing

scenarios builds may rely on this behavior. So instead of failing,

Gradle now prints a warning message.

  1. … 2 more files in changeset.
Disable some https test on JDK12

Each test method takes about 5 minutes because of

https://bugs.openjdk.java.net/browse/JDK-8219658.

The bug may be fixed JDK 12.02, so maybe we should upgrade

to this version at some point.

  1. … 2 more files in changeset.
Adjust tests and samples to new publishing default behavior

    • -12
    • +5
    ./api/publish/ivy/IvyGradleModuleMetadataPublishIntegrationTest.groovy
    • -2
    • +1
    ./api/publish/ivy/IvyPublishArtifactCustomizationIntegTest.groovy
    • -2
    • +0
    ./api/publish/ivy/IvyPublishDescriptorCustomizationIntegTest.groovy
    • -11
    • +11
    ./api/publish/ivy/SamplesIvyPublishIntegrationTest.groovy
    • -4
    • +0
    ./integtests/publish/ivy/IvyPublishResolvedVersionsJavaIntegTest.groovy
  1. … 36 more files in changeset.