Skip to content

[2.x] feat: Implement ivyless publishLocal#8634

Merged
eed3si9n merged 2 commits intosbt:developfrom
calm329:wip/ivyless-publish-local
Jan 27, 2026
Merged

[2.x] feat: Implement ivyless publishLocal#8634
eed3si9n merged 2 commits intosbt:developfrom
calm329:wip/ivyless-publish-local

Conversation

@calm329
Copy link
Copy Markdown
Contributor

@calm329 calm329 commented Jan 26, 2026

Summary

Implements ivyless publishLocal task as part of the effort to remove Ivy dependency (#7639).

Fixes #8631

Changes:

  • Add useIvy setting key (defaults to true)
  • Add ivylessPublishLocalImpl helper that publishes without Ivy
  • Modify publishLocal to use ivyless publisher when useIvy := false
  • Generate ivy.xml via lmcoursier.IvyXml
  • Generate MD5/SHA-1 checksums for all files
  • Add scripted test dependency-management/ivyless-publish-local

Files changed:

  • main/src/main/scala/sbt/Keys.scala - new setting key
  • main/src/main/scala/sbt/Defaults.scala - implementation
  • sbt-app/src/sbt-test/dependency-management/ivyless-publish-local/ - scripted test

Test plan

  • mainProj/compile passes
  • mainProj/test passes (91 tests)
  • scalafmtCheckAll passes
  • mimaReportBinaryIssues passes
  • scripted dependency-management/ivyless-publish-local passes
  • Artifact customization works (packageDoc / publishArtifact := false)

@calm329
Copy link
Copy Markdown
Contributor Author

calm329 commented Jan 26, 2026

@eed3si9n Could you please review my pr?

@eed3si9n
Copy link
Copy Markdown
Member

I don't have time to do a detailed review, but pretty excited about this one. Thanks for the contribution!

@calm329
Copy link
Copy Markdown
Contributor Author

calm329 commented Jan 26, 2026

I don't have time to do a detailed review, but pretty excited about this one. Thanks for the contribution!

Feel free to do it when you get a chance

Comment on lines +3850 to +3851
// Helper to compute hash using MessageDigest
def computeHash(file: File, algorithm: String): String = {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sbt.util.Digest(Digest.Sha1, path) can be used from https://github.com/sbt/sbt/blob/develop/util-cache/src/main/scala/sbt/util/Digest.scala, although Digest probably need a method added to get just the hash string.

@calm329
Copy link
Copy Markdown
Contributor Author

calm329 commented Jan 27, 2026

@eed3si9n I've fixed all. Would you mind taking a second look?

Copy link
Copy Markdown
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

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

Thanks for the quick turnaround. lgtm!

@eed3si9n eed3si9n merged commit 5789a7e into sbt:develop Jan 27, 2026
14 checks passed
@eed3si9n eed3si9n changed the title feat: Implement ivyless publishLocal [2.x] feat: Implement ivyless publishLocal Jan 27, 2026
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.

[2.x] Ivyless publishLocal

2 participants