From dbf376303785ba03ddb8e4b8ee1de6248f55ee13 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Mon, 12 Mar 2018 11:18:20 +0100 Subject: [PATCH] Don't require publishing stuff locally prior to running scripted tests --- appveyor.yml | 7 +++---- build.sbt | 45 +++++++++++++++++++++++---------------------- scripts/travis.sh | 3 +-- 3 files changed, 27 insertions(+), 28 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 46ccd8193..983ea5eed 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,8 +18,7 @@ install: build_script: - sbt ++2.11.12 clean compile coreJVM/publishLocal - sbt ++2.10.7 clean compile - - sbt ++2.12.4 coreJVM/publishLocal cacheJVM/publishLocal cli/publishLocal extra/publishLocal scalazJVM/publishLocal sbt-shared/publishLocal - - sbt ++2.10.7 coreJVM/publishLocal cacheJVM/publishLocal extra/publishLocal sbt-shared/publishLocal + - sbt ++2.12.4 coreJVM/publishLocal cacheJVM/publishLocal extra/publishLocal scalazJVM/publishLocal cli/publishLocal 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 @@ -27,8 +26,8 @@ test_script: - sbt ++2.12.4 testsJVM/test testsJVM/it:test # Would node be around for testsJS/test? - sbt ++2.11.12 testsJVM/test testsJVM/it:test - sbt ++2.10.7 testsJVM/test testsJVM/it:test - - sbt ++2.12.4 "sbt-coursier/scripted sbt-coursier/simple" sbt-coursier/publishLocal "sbt-shading/scripted sbt-shading/*" # for sbt 1.0 - - sbt ++2.10.7 "sbt-coursier/scripted sbt-coursier/*" "sbt-coursier/scripted sbt-coursier-0.13/*" sbt-coursier/publishLocal "sbt-shading/scripted sbt-shading/*" "sbt-shading/scripted sbt-shading-0.13/*" # for sbt 0.13 + - sbt ++2.12.4 "sbt-coursier/scripted sbt-coursier/simple" "sbt-shading/scripted sbt-shading/*" # for sbt 1.0 + - sbt ++2.10.7 "sbt-coursier/scripted sbt-coursier/*" "sbt-coursier/scripted sbt-coursier-0.13/*" "sbt-shading/scripted sbt-shading/*" "sbt-shading/scripted sbt-shading-0.13/*" # for sbt 0.13 branches: only: - master diff --git a/build.sbt b/build.sbt index 75ceb061d..03eb4008c 100644 --- a/build.sbt +++ b/build.sbt @@ -277,7 +277,18 @@ lazy val `sbt-coursier` = project .disablePlugins(ScriptedPlugin) .settings( plugin, - utest + utest, + scriptedDependencies := { + scriptedDependencies.value + + // TODO Get dependency projects automatically + // (but shouldn't scripted itself handle that…?) + publishLocal.in(coreJvm).value + publishLocal.in(cacheJvm).value + publishLocal.in(extra).value + publishLocal.in(`sbt-shared`).value + publishLocal.in(scalazJvm).value + } ) lazy val `sbt-pgp-coursier` = project @@ -291,6 +302,11 @@ lazy val `sbt-pgp-coursier` = project Seq(Deps.sbtPgp.value) case _ => Nil } + }, + scriptedDependencies := { + scriptedDependencies.value + // TODO Get dependency projects automatically + scriptedDependencies.in(`sbt-coursier`).value } ) @@ -304,7 +320,12 @@ lazy val `sbt-shading` = project localM2Repository, // for a possibly locally published jarjar libs += Deps.jarjar % "shaded", // dependencies of jarjar-core - directly depending on these so that they don't get shaded - libs ++= Deps.jarjarTransitiveDeps + libs ++= Deps.jarjarTransitiveDeps, + scriptedDependencies := { + scriptedDependencies.value + // TODO Get dependency projects automatically + scriptedDependencies.in(`sbt-coursier`).value + } ) lazy val okhttp = project @@ -357,26 +378,6 @@ lazy val js = project moduleName := "coursier-js" ) -// run sbt-plugins/publishLocal to publish all that necessary for plugins -lazy val `sbt-plugins` = project - .dummy - .disablePlugins(ScriptedPlugin) - .aggregate( - coreJvm, - cacheJvm, - scalazJvm, - extra, - `sbt-shared`, - `sbt-coursier`, - `sbt-pgp-coursier`, - `sbt-shading` - ) - .settings( - shared, - pluginOverrideCrossScalaVersion, - dontPublish - ) - lazy val coursier = project .in(root) .disablePlugins(ScriptedPlugin) diff --git a/scripts/travis.sh b/scripts/travis.sh index ef36001ef..643388e59 100755 --- a/scripts/travis.sh +++ b/scripts/travis.sh @@ -70,7 +70,6 @@ sbtShading() { runSbtCoursierTests() { addPgpKeys - sbt ++$SCALA_VERSION sbt-plugins/publishLocal if [ "$SCALA_VERSION" = "2.10" ]; then sbt ++$SCALA_VERSION "sbt-coursier/scripted sbt-coursier/*" "sbt-coursier/scripted sbt-coursier-0.13/*" else @@ -80,7 +79,7 @@ runSbtCoursierTests() { } runSbtShadingTests() { - sbt ++$SCALA_VERSION coreJVM/publishLocal cacheJVM/publishLocal extra/publishLocal sbt-shared/publishLocal sbt-coursier/publishLocal "sbt-shading/scripted sbt-shading/*" + sbt ++$SCALA_VERSION "sbt-shading/scripted sbt-shading/*" if [ "$SCALA_VERSION" = "2.10" ]; then sbt ++$SCALA_VERSION "sbt-shading/scripted sbt-shading-0.13/*" fi