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

Support for SBT 1.0.x #50

Closed
michaelahlers opened this issue Sep 10, 2017 · 7 comments · Fixed by #51
Closed

Support for SBT 1.0.x #50

michaelahlers opened this issue Sep 10, 2017 · 7 comments · Fixed by #51

Comments

@michaelahlers
Copy link

With the 1.0.x release of SBT, plugins are needed compiled against Scala 2.12. In other words, with sbt.version = 1.0.1 (for example), this error occurs on dependency resolution:

[warn] ==== Era7 (releases): tried
[warn]   https://s3-eu-west-1.amazonaws.com/releases.era7.com/ohnosequences/sbt-s3-resolver_2.12_1.0/0.16.0/sbt-s3-resolver-0.16.0.pom
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	::          UNRESOLVED DEPENDENCIES         ::
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	:: ohnosequences#sbt-s3-resolver;0.16.0: not found
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
@laughedelic
Copy link
Contributor

Hi @michaelahlers! I was going to publish the plugin for sbt 1.0, but right now I don't have time for it at all. It should be very straightforward. If you know how, please submit a PR.

@michaelahlers
Copy link
Author

I'm happy to give it a shot! Just don't know when I'll find the time. Hopefully soon and I'll follow up!

@hkupty
Copy link
Contributor

hkupty commented Sep 12, 2017

It seems some dependencies also require to be bumped to 1.0.1/2.12 and there is quite a circular depency there (sbt-s3-resolver depends on nice-sbt-settings which requires itself and sbt-s3-resolver).

@laughedelic
Copy link
Contributor

laughedelic commented Sep 12, 2017

@hkupty no-no, don't worry, you don't need to update the plugin to build a project. It's like when you're working on a normal sbt project, you can use any version of scala for your code in the project, while the sbt plugins in the meta-project will be using scala version correspondent to the running sbt.

So in short, what you need to to here to upgrade this plugin to sbt-1.0:

  • project/build.properties change sbt version to 0.13.16 (that can cross build with sbt 0.13 & 1.0)
  • build.sbt setup sbtVersion := "1.0" and scalaVersion := "2.12.3" (check sbt docs for how exactly to do that)
  • try to compile and see if anything in the code requires updating (shouldn't be)

It should be very easy, but I would really appreciate a pull-request with these simple changes. Then I can cut a release this weekend.

@macalinao
Copy link
Contributor

I'll try my hand at this.

@laughedelic
Copy link
Contributor

laughedelic commented Sep 19, 2017

Hey guys! Thanks to @macalinao the plugin now is upgraded to sbt-1.x 👏
I also took an opportunity to update the underlying library and added a new feature (see #35).

I just released v0.17.0 (see release notes), but there's an important change: plugin now is published to Bintray. The point is, that it's added to the sbt-plugins community repository, so you don't need to add any resolvers for the plugin anymore.
But the underlying library is still in the process to be added to the central repo. It should be sorted out during the day (I'll notify you here). Once it happens, you can start using sbt-s3-resolver, by simply having

addSbtPlugin("ohnosequences" % "sbt-s3-resolver" % "0.17.0")

in your project/plugins.sbt. You can remove the resolvers += ... line from the previous version.

@laughedelic
Copy link
Contributor

Update

In the end I realised that I was confused about JCenter: I thought that it's one of the default resolvers in sbt, but it's not. You can include it with resolvers += Resolver.jcenterRepo or replace Maven Central with it by useJCenter := true. Anyway, the plugin still needs a resolver to be added to project/plugins.sbt:

resolvers += Resolver.jcenterRepo
addSbtPlugin("ohnosequences" % "sbt-s3-resolver" % "0.17.0")

Sorry for the confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

4 participants