From e76f6170f1ba2c6f3f981fe5a41163f84fbca0a2 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Thu, 11 May 2017 23:54:52 +0200 Subject: [PATCH] Move typelevel-related things to new extra module --- appveyor.yml | 4 ++-- build.sbt | 13 +++++++++++-- cli/src/main/scala-2.11/coursier/cli/Helper.scala | 2 +- .../src/main/scala/coursier/extra}/Typelevel.scala | 2 +- scripts/travis.sh | 6 +++--- 5 files changed, 18 insertions(+), 9 deletions(-) rename {cli/src/main/scala-2.11/coursier/cli/typelevel => extra/src/main/scala/coursier/extra}/Typelevel.scala (95%) diff --git a/appveyor.yml b/appveyor.yml index ab7b7a389..1e2c1663a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,8 +24,8 @@ install: build_script: - sbt ++2.11.11 clean compile coreJVM/publishLocal http-server/publishLocal - sbt ++2.10.6 clean compile - - sbt ++2.12.1 coreJVM/publishLocal cache/publishLocal # to make the scripted sbt 1.0 tests happy - - sbt ++2.10.6 coreJVM/publishLocal cache/publishLocal # to make the scripted sbt 0.13 tests happy + - sbt ++2.12.1 coreJVM/publishLocal cache/publishLocal extra/publishLocal # to make the scripted sbt 1.0 tests happy + - sbt ++2.10.6 coreJVM/publishLocal cache/publishLocal extra/publishLocal # to make the scripted sbt 0.13 tests happy test_script: - ps: Start-Job -filepath .\scripts\start-it-auth-server.ps1 -ArgumentList $pwd - ps: Start-Sleep -s 15 # wait for the first server to have downloaded its dependencies diff --git a/build.sbt b/build.sbt index d0ab3fd3a..a854bb232 100644 --- a/build.sbt +++ b/build.sbt @@ -88,8 +88,15 @@ lazy val bootstrap = project renameMainJar("bootstrap.jar") ) +lazy val extra = project + .dependsOn(coreJvm) + .settings( + shared, + coursierPrefix + ) + lazy val cli = project - .dependsOn(coreJvm, cache) + .dependsOn(coreJvm, cache, extra) .settings( shared, dontPublishIn("2.10", "2.12"), @@ -166,7 +173,7 @@ lazy val doc = project // Don't try to compile that if you're not in 2.10 lazy val `sbt-coursier` = project - .dependsOn(coreJvm, cache) + .dependsOn(coreJvm, cache, extra) .settings(plugin) // Don't try to compile that if you're not in 2.10 @@ -224,6 +231,7 @@ lazy val jvm = project testsJvm, cache, bootstrap, + extra, cli, `sbt-coursier`, `sbt-shading`, @@ -262,6 +270,7 @@ lazy val coursier = project testsJs, cache, bootstrap, + extra, cli, `sbt-coursier`, `sbt-shading`, diff --git a/cli/src/main/scala-2.11/coursier/cli/Helper.scala b/cli/src/main/scala-2.11/coursier/cli/Helper.scala index 45b1cc2bb..591726ba3 100644 --- a/cli/src/main/scala-2.11/coursier/cli/Helper.scala +++ b/cli/src/main/scala-2.11/coursier/cli/Helper.scala @@ -7,7 +7,7 @@ import java.util.jar.{ Manifest => JManifest } import java.util.concurrent.Executors import coursier.cli.scaladex.Scaladex -import coursier.cli.typelevel.Typelevel +import coursier.extra.Typelevel import coursier.ivy.IvyRepository import coursier.util.{Print, Parse} diff --git a/cli/src/main/scala-2.11/coursier/cli/typelevel/Typelevel.scala b/extra/src/main/scala/coursier/extra/Typelevel.scala similarity index 95% rename from cli/src/main/scala-2.11/coursier/cli/typelevel/Typelevel.scala rename to extra/src/main/scala/coursier/extra/Typelevel.scala index 72c290077..b0d88adfb 100644 --- a/cli/src/main/scala-2.11/coursier/cli/typelevel/Typelevel.scala +++ b/extra/src/main/scala/coursier/extra/Typelevel.scala @@ -1,4 +1,4 @@ -package coursier.cli.typelevel +package coursier.extra import coursier.{Dependency, Module} diff --git a/scripts/travis.sh b/scripts/travis.sh index 5345f8f86..b81098d0d 100755 --- a/scripts/travis.sh +++ b/scripts/travis.sh @@ -75,14 +75,14 @@ is212() { } runSbtCoursierTests() { - sbt ++$SCALA_VERSION coreJVM/publishLocal cache/publishLocal "sbt-coursier/scripted sbt-coursier/*" + sbt ++$SCALA_VERSION coreJVM/publishLocal cache/publishLocal extra/publishLocal "sbt-coursier/scripted sbt-coursier/*" if [ "$SCALA_VERSION" = "2.10" ]; then sbt ++$SCALA_VERSION "sbt-coursier/scripted sbt-coursier-0.13/*" fi } runSbtShadingTests() { - sbt ++$SCALA_VERSION coreJVM/publishLocal cache/publishLocal sbt-coursier/publishLocal "sbt-shading/scripted sbt-shading/*" + sbt ++$SCALA_VERSION coreJVM/publishLocal cache/publishLocal extra/publishLocal sbt-coursier/publishLocal "sbt-shading/scripted sbt-shading/*" if [ "$SCALA_VERSION" = "2.10" ]; then sbt ++$SCALA_VERSION "sbt-shading/scripted sbt-shading-0.13/*" fi @@ -128,7 +128,7 @@ testLauncherJava6() { } testSbtCoursierJava6() { - sbt ++${SCALA_VERSION} coreJVM/publishLocal cache/publishLocal sbt-coursier/publishLocal + sbt ++${SCALA_VERSION} coreJVM/publishLocal cache/publishLocal extra/publishLocal sbt-coursier/publishLocal git clone https://github.com/alexarchambault/scalacheck-shapeless.git cd scalacheck-shapeless