From b91031034c0d0b890f8b590e00e1b7fa47d15045 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Tue, 11 Jul 2017 19:40:50 +0200 Subject: [PATCH] Use custom published scala-native stuff --- appveyor.yml | 10 ---------- build.sbt | 11 ++++++----- project/Deps.scala | 4 ++++ project/SharedVersions.scala | 1 + scripts/travis.sh | 16 +--------------- 5 files changed, 12 insertions(+), 30 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9585082a0..7dac54acd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,16 +14,6 @@ install: - cmd: SET PATH=C:\sbt\sbt\bin;%JAVA_HOME%\bin;%PATH% - cmd: SET SBT_OPTS=-XX:MaxPermSize=2g -Xmx4g - git submodule update --init --recursive - - ps: | - if (!(Test-Path 'C:\Users\appveyor\.ivy2\local\sandbox\sandbox_native0.3_2.11\0.1-SNAPSHOT')) { - iex 'git clone https://github.com/coursier/scala-native' - Set-Location -Path scala-native - iex 'git checkout 550bf6e37d27' - iex 'sbt ++2.11.8 sandbox/publishLocal' - iex 'git checkout f8088aef6981' - iex 'sbt ++2.11.8 nscplugin/publishLocal util/publishLocal nir/publishLocal tools/publishLocal' - 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 e6dfabf5a..a82dc52ed 100644 --- a/build.sbt +++ b/build.sbt @@ -117,13 +117,14 @@ lazy val extra = project coursierPrefix, shading, libs ++= { - val ver = "0.3.0-coursier-1" if (scalaBinaryVersion.value == "2.11") Seq( - "org.scala-native" %% "tools" % ver % "shaded", - // brought by tools, but issues in ShadingPlugin (with things published locally?) makes these not be shaded... - "org.scala-native" %% "nir" % ver % "shaded", - "org.scala-native" %% "util" % ver % "shaded", + Deps.scalaNativeTools % "shaded", + // brought by only tools, so should be automaticaly shaded, + // but issues in ShadingPlugin (with things published locally?) + // seem to require explicit shading... + Deps.scalaNativeNir % "shaded", + Deps.scalaNativeUtil % "shaded", Deps.fastParse % "shaded" ) else diff --git a/project/Deps.scala b/project/Deps.scala index 473bb4b5e..522fb29cd 100644 --- a/project/Deps.scala +++ b/project/Deps.scala @@ -48,4 +48,8 @@ object Deps { "org.ow2.asm" % "asm-util" % "5.0.3", "org.slf4j" % "slf4j-api" % "1.7.25" ) + + def scalaNativeNir = "io.get-coursier.scala-native" %% "nir" % SharedVersions.scalaNative + def scalaNativeTools = "io.get-coursier.scala-native" %% "tools" % SharedVersions.scalaNative + def scalaNativeUtil = "io.get-coursier.scala-native" %% "util" % SharedVersions.scalaNative } diff --git a/project/SharedVersions.scala b/project/SharedVersions.scala index 75097ecde..76a48d7cb 100644 --- a/project/SharedVersions.scala +++ b/project/SharedVersions.scala @@ -4,6 +4,7 @@ object SharedVersions { def fastParse = "0.4.3" def http4s = "0.15.13a" def proguard = "5.3.3" + def scalaNative = "0.3.0-coursier-1" def scalaz = "7.2.13" } diff --git a/scripts/travis.sh b/scripts/travis.sh index e9906d834..5e8168c1d 100755 --- a/scripts/travis.sh +++ b/scripts/travis.sh @@ -56,18 +56,6 @@ integrationTestsRequirements() { launchTestRepo --port 8081 } -setupCustomScalaNative() { - if [ ! -d "$HOME/.ivy2/local/org.scala-native/tools_2.11/0.3.0-coursier-1" ]; then - git clone https://github.com/coursier/scala-native.git - cd scala-native - git checkout 550bf6e37d27 - sbt ++2.11.8 sandbox/publishLocal - git checkout f8088aef6981 - sbt ++2.11.8 nscplugin/publishLocal util/publishLocal nir/publishLocal tools/publishLocal - cd .. - fi -} - isScalaJs() { [ "$SCALA_JS" = 1 ] } @@ -217,7 +205,7 @@ testBootstrap() { testNativeBootstrap() { if is211; then sbt ++${SCALA_VERSION} cli/pack - cli/target/pack/bin/coursier bootstrap -S -o native-test sandbox::sandbox_native0.3:0.1-SNAPSHOT + cli/target/pack/bin/coursier bootstrap -S -o native-test io.get-coursier.scala-native::sandbox_native0.3:0.3.0-coursier-1 if [ "$(./native-test)" != "Hello, World!" ]; then echo "Error: unexpected output from native test bootstrap." 1>&2 exit 1 @@ -237,8 +225,6 @@ addPgpKeys() { downloadInstallSbtExtras setupCoursierBinDir -setupCustomScalaNative - if isScalaJs; then jsCompile runJsTests