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

Correctly pick up test-jar dependency sources #1756

Merged
merged 1 commit into from
Jul 11, 2022

Conversation

keynmol
Copy link
Collaborator

@keynmol keynmol commented Jul 11, 2022

fixes

test-jar dependencies not only have a different suffix for regular jars -tests.jar, but they also have a different one for test sources :D -test-sources.jar notice that it's test not tests.

They also need to have a different classifier (test-sources).

refactoring

resolveArtifact now takes sources: Boolean parameter instead of a wider classifier: Option[String] - we only ever use it to download sources, so we can tighten down the method contract.

I would also argue that resolveArtifact needs to return case class ResolvedArtifact(af: Artifact, sources: Boolean, file: File) so that we don't need to do this string manipulation with jar names, but it would involve larger refactoring than what I'm ready to commit to in this PR.

@keynmol keynmol requested a review from tgodzik July 11, 2022 11:58
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for digging into this!

@tgodzik tgodzik merged commit 08c81b7 into scalacenter:main Jul 11, 2022
@keynmol keynmol deleted the fix-test-jars-maven-sources branch July 11, 2022 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants