ohnosequences / sbt-s3-resolver

:cloud:Amazon S3-based resolver for sbt
GNU Affero General Public License v3.0
117 stars 29 forks source link

Support for SBT 1.0.x #50

Closed michaelahlers closed 7 years ago

michaelahlers commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

@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:

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 commented 7 years ago

I'll try my hand at this.

laughedelic commented 7 years ago

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 commented 7 years ago

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.