Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

baseline-java-versions uses library presets for projects using shadow-jar #2108

Merged
merged 3 commits into from
Mar 8, 2022

Conversation

carterkozak
Copy link
Contributor

Before this PR

Cannot change dependencies of dependency configuration ':PROJECT:runtimeElements' after it has been included in dependency resolution

After this PR

==COMMIT_MSG==
baseline-java-versions uses library presets for projects using shadow-jar to prevent resolution/mutation ordering failures
==COMMIT_MSG==

@changelog-app
Copy link

changelog-app bot commented Mar 8, 2022

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

baseline-java-versions uses library presets for projects using shadow-jar to prevent resolution/mutation ordering failures

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from jkozlowski March 8, 2022 18:44
// 'nebula.maven-publish' and 'com.github.johnrengelman.shadow' create publications lazily which cause
// inconsistencies based on ordering.
private static final ImmutableSet<String> LIBRARY_PLUGINS =
ImmutableSet.of("nebula.maven-publish", "com.github.johnrengelman.shadow");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it actually the johnrengelman shadow or is it our gradle-shadow-jar which does this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, our one doesn't create publications - I'd be surprised if the johnrengelman did as well, as you have normally have to fiddle about with publications when using it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I think this is on us due to ShadowJarPlugin ensureShadowJarIsOnlyArtifactOnJavaConfigurations + dependOnJarTaskInOrderToTriggerTasksAddingManifestAttributes

@CRogers
Copy link
Contributor

CRogers commented Mar 8, 2022

👍

@carterkozak carterkozak force-pushed the ckozak/special_case_shadowjar branch from 7eb7fd8 to f8164bd Compare March 8, 2022 19:04
@bulldozer-bot bulldozer-bot bot merged commit 710edd9 into develop Mar 8, 2022
@bulldozer-bot bulldozer-bot bot deleted the ckozak/special_case_shadowjar branch March 8, 2022 19:05
@svc-autorelease
Copy link
Collaborator

Released 4.75.0

This was referenced Mar 8, 2022
bulldozer-bot bot pushed a commit to palantir/witchcraft-api that referenced this pull request Mar 15, 2022
###### _excavator_ is a bot for automating changes across repositories.

Changes produced by the roomba/latest-baseline-oss check.

# Release Notes
## 4.75.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Improvement | Finalize java-versions extension values on read to prevent changes due to interactions from other plugins | palantir/gradle-baseline#2107 |
| Improvement | baseline-java-versions uses library presets for projects using shadow-jar to prevent resolution/mutation ordering failures | palantir/gradle-baseline#2108 |



To enable or disable this check, please contact the maintainers of Excavator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants