Skip to content

Add useJCenter settings and set it to false by default#2335

Merged
eed3si9n merged 3 commits into0.13from
wip/bintrayfix
Dec 26, 2015
Merged

Add useJCenter settings and set it to false by default#2335
eed3si9n merged 3 commits into0.13from
wip/bintrayfix

Conversation

@eed3si9n
Copy link
Member

Fixes #2217

what this changes

Adds a new setting useJCenter, which is set to false by default. When set to true, JCenter will be placed as the first external resolver to find library dependencies.

The implementation of externalResolvers is changed to incorporate the setting by calling Resolver.reorganizeAppResolvers. These changes were required because externalResolvers uses whatever that's in the launchconfig, which the build user may not upgrade.

notes

sbt 0.13.9 made JCenter the first external resolver "for faster resolution times". #1938 (9261652.
From what I tested using Reactive Maps + Play 2.3.10, JCenter takes 212 ~ 251s for update to return on the proper build (excluding plugins) while Maven Central takes 71 ~ 98s for update. Basically 2 ~ 3.5 times slower. ymmv.

/review @Duhemm, @dwijnand, @jsuereth

Adds a new setting `useJCenter`, which is set to `false` by default.
When set to `true`, JCenter will be placed as the first external
resolver to find library dependencies.

The implementation of `externalResolvers` is changed to incorporate the
setting by calling `Resolver.reorganizeAppResolvers`. These changes
were required because `externalResolvers` uses whatever that's in the
launchconfig, which the build user may not upgrade.
@dwijnand
Copy link
Member

LGTM. Thanks.

@fommil
Copy link
Contributor

fommil commented Dec 26, 2015

👍

eed3si9n added a commit that referenced this pull request Dec 26, 2015
Add useJCenter settings and set it to false by default
@eed3si9n eed3si9n merged commit c1129ce into 0.13 Dec 26, 2015
@eed3si9n eed3si9n deleted the wip/bintrayfix branch December 26, 2015 12:35
externalResolvers <<= (externalResolvers.task.?, resolvers, appResolvers, useJCenter) {
case (Some(delegated), Seq(), _, _) => delegated
case (_, rs, Some(ars), uj) => task { ars ++ Resolver.reorganizeAppResolvers(rs, uj, true) }
case (_, rs, _, uj) => task { Resolver.withDefaultResolvers(rs, uj) }
Copy link
Member

Choose a reason for hiding this comment

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

death by booleans.. this is using useJCenter as the value of mavenCentral..

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.

3 participants