From 3271d90b26b01adf350e7002e6149ffc61b59b61 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Tue, 11 Jul 2017 19:04:00 +0200 Subject: [PATCH] Use custom published version of jarjar --- appveyor.yml | 8 -------- build.sbt | 2 +- project/Deps.scala | 24 +----------------------- scripts/travis.sh | 16 ---------------- 4 files changed, 2 insertions(+), 48 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index e43212432..9585082a0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,14 +24,6 @@ install: iex 'sbt ++2.11.8 nscplugin/publishLocal util/publishLocal nir/publishLocal tools/publishLocal' Set-Location -Path .. } - - ps: | - if (!(Test-Path 'C:\Users\appveyor\.m2\repository\org\anarres\jarjar\jarjar-core\1.0.1-coursier-SNAPSHOT')) { - iex 'git clone https://github.com/alexarchambault/jarjar' - Set-Location -Path jarjar - iex 'git checkout 249c8dbb970f8' - iex './gradlew.bat :jarjar-core:install' - Set-Location -Path .. - } build_script: - sbt ++2.11.11 clean compile coreJVM/publishLocal cli/publishLocal - sbt ++2.12.1 http-server/publishLocal diff --git a/build.sbt b/build.sbt index a1abe9532..e6dfabf5a 100644 --- a/build.sbt +++ b/build.sbt @@ -240,7 +240,7 @@ lazy val `sbt-shading` = project plugin, shading, localM2Repository, // for a possibly locally published jarjar - libs += Deps.jarjar.value % "shaded", + libs += Deps.jarjar % "shaded", // dependencies of jarjar-core - directly depending on these so that they don't get shaded libs ++= Deps.jarjarTransitiveDeps ) diff --git a/project/Deps.scala b/project/Deps.scala index 628e082cc..473bb4b5e 100644 --- a/project/Deps.scala +++ b/project/Deps.scala @@ -40,29 +40,7 @@ object Deps { "org.scala-lang.modules" %% "scala-async" % version } - def jarjar = Def.setting { - val coursierJarjarVersion = "1.0.1-coursier-SNAPSHOT" - def coursierJarjarFoundInM2 = (file(sys.props("user.home")) / s".m2/repository/org/anarres/jarjar/jarjar-core/$coursierJarjarVersion").exists() - - val jarjarVersion = - if (sys.env.contains("CI") || coursierJarjarFoundInM2 || !isSnapshot.value) - coursierJarjarVersion - else { - val fallback = "1.0.0" - - // streams.value.log.warn( // "a setting cannot depend on a task" - scala.Console.err.println( - s"""Warning: using jarjar $fallback, which doesn't properly shade Scala JARs (classes with '$$' aren't shaded). - |See the instructions around - |https://github.com/coursier/coursier/blob/630a780487d662dd994ed1c3246895a22c00cf21/scripts/travis.sh#L40 - |to use a version fine with Scala JARs.""".stripMargin - ) - - fallback - } - - "org.anarres.jarjar" % "jarjar-core" % jarjarVersion - } + def jarjar = "io.get-coursier.jarjar" % "jarjar-core" % "1.0.1-coursier-1" def jarjarTransitiveDeps = Seq( "com.google.code.findbugs" % "jsr305" % "2.0.2", diff --git a/scripts/travis.sh b/scripts/travis.sh index 184f2f469..e9906d834 100755 --- a/scripts/travis.sh +++ b/scripts/travis.sh @@ -68,21 +68,6 @@ setupCustomScalaNative() { fi } -setupCustomJarjar() { - if [ ! -d "$HOME/.m2/repository/org/anarres/jarjar/jarjar-core/$JARJAR_VERSION" ]; then - git clone https://github.com/alexarchambault/jarjar.git - cd jarjar - if ! grep -q "^version=$JARJAR_VERSION\$" gradle.properties; then - echo "Expected jarjar version not found" 1>&2 - exit 1 - fi - git checkout 249c8dbb970f8 - ./gradlew :jarjar-core:install - cd .. - rm -rf jarjar - fi -} - isScalaJs() { [ "$SCALA_JS" = 1 ] } @@ -252,7 +237,6 @@ addPgpKeys() { downloadInstallSbtExtras setupCoursierBinDir -setupCustomJarjar setupCustomScalaNative if isScalaJs; then