MavenPublishCoordinatesIntegTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Rename @FailsWithInstantExecution to @ToBeFixedForInstantExecution

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

    • -6
    • +6
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 872 more files in changeset.
Annotate integ tests failing with instant execution in :maven

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

    • -0
    • +6
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 39 more files in changeset.
Annotate integ tests failing with instant execution in :maven

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

    • -0
    • +6
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 39 more files in changeset.
Avoid more deprecated APIs

    • -2
    • +2
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 43 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

    • -2
    • +2
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 64 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

    • -2
    • +2
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 56 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

    • -2
    • +2
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 60 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

    • -2
    • +2
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 63 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

    • -2
    • +2
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 61 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

    • -2
    • +2
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 61 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

    • -2
    • +2
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 64 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

    • -2
    • +2
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 64 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.

    • -8
    • +9
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 2 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.

    • -8
    • +9
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 2 more files in changeset.
Detect duplicate publications for `publishToMavenLocal`

    • -0
    • +6
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 6 more files in changeset.
Detect duplicate publications for `publishToMavenLocal`

    • -0
    • +6
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 6 more files in changeset.
Detect duplicate publications for `publishToMavenLocal`

    • -0
    • +6
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 7 more files in changeset.
Detect duplicate publications for `publishToMavenLocal`

    • -0
    • +6
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 7 more files in changeset.
Detect duplicate publications for `publishToMavenLocal`

    • -0
    • +6
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 7 more files in changeset.
Detect duplicate publications for `publishToMavenLocal`

    • -0
    • +6
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 6 more files in changeset.
Detect duplicate publications for `publishToMavenLocal`

    • -0
    • +6
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 6 more files in changeset.
Improve detection of duplicate publications

- Validate duplicate publications accross projects

- Do not fail when same repository is defined multiple times

    • -0
    • +66
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 5 more files in changeset.
Improve detection of duplicate publications

- Validate duplicate publications accross projects

- Do not fail when same repository is defined multiple times

    • -0
    • +66
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 5 more files in changeset.
Improve detection of duplicate publications

- Validate duplicate publications accross projects

- Do not fail when same repository is defined multiple times

    • -0
    • +66
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 6 more files in changeset.
Improve detection of duplicate publications

- Validate duplicate publications accross projects

- Do not fail when same repository is defined multiple times

    • -0
    • +66
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 6 more files in changeset.
Improve detection of duplicate publications

- Validate duplicate publications accross projects

- Do not fail when same repository is defined multiple times

    • -0
    • +66
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 6 more files in changeset.
Improve detection of duplicate publications

- Validate duplicate publications accross projects

- Do not fail when same repository is defined multiple times

    • -0
    • +66
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 6 more files in changeset.
Improve detection of duplicate publications

- Validate duplicate publications accross projects

- Do not fail when same repository is defined multiple times

    • -0
    • +66
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 6 more files in changeset.
Improve detection of duplicate publications

- Validate duplicate publications accross projects

- Do not fail when same repository is defined multiple times

    • -0
    • +66
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 6 more files in changeset.
Prohibit multiple publications of the same type with the same target coordinates

When defining multiple publications, it is easy to accidentally give 2 publications the

same module coordinates. In particular, if no publication defines specific coordinates,

they all share the same default coordinates for the project.

When published, the second one published to a repository will overwrite the previous,

often resulting in an unusable published module.

There are valid use cases for configuring multiple publications, but only publishing one

of them (the "maven-publish/conditional-publishing" sample does just this). As such, we

need to validate late, only when a publication is actually published.

This commit validates each publication as it is published, failing the build with a

helpful message if a publication with the same coordinates has already been published

to the same repository. At this stage, the check is only performed on publications within

a single project.

Fixes #3835

    • -0
    • +44
    ./MavenPublishCoordinatesIntegTest.groovy
  1. … 7 more files in changeset.