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

Add sbt 0.13 support #8

Merged
merged 2 commits into from
Aug 3, 2018
Merged

Add sbt 0.13 support #8

merged 2 commits into from
Aug 3, 2018

Conversation

olafurpg
Copy link
Contributor

@olafurpg olafurpg commented Aug 2, 2018

This is the first step towards supporting scalafixDependencies, adding the ability to run custom rules like scala-collection-compat that are published to Maven Central.

This commit refactors the build to reflectively invoke scalafix instead
of calling the API directly. This has the following benefits

  • works for 0.13 and 1.0
  • avoids binary compatibility issues with sbt classpath (scalapb,
    fastparse, ...). We should shade scalafix dependencies but that would
    make it impossible support running custom rules that are published to
    Maven Central.

This commit refactors the build to reflectively invoke scalafix instead
of calling the API directly. This has the following benefits

- works for 0.13 and 1.0
- avoids binary compatibility issues with sbt classpath (scalapb,
  fastparse, ...). We should shade scalafix dependencies but that would
  make it impossible support running custom rules that are published to
  Maven Central.
.withDependencies(List(dep))
.withRepositories(
List(
Repository.MavenCentral,
Copy link
Contributor

Choose a reason for hiding this comment

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

Cache.ivy2Local

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

This fixes a resolution error for sbt-scripted when cross-building
against 0.13. It seems that sbt plugins should simply be single project
builds, I've given up on trying to fight against it.
@olafurpg
Copy link
Contributor Author

olafurpg commented Aug 3, 2018

Cross-building finally works for 0.13 and 1.2 💪 Let's see if the release scripts work as well.

@olafurpg olafurpg merged commit f906e52 into scalacenter:master Aug 3, 2018
@olafurpg olafurpg deleted the sbt-013 branch August 3, 2018 08:58
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 participants