diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-06-21 10:16:48 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-06-21 10:16:48 +0200 |
commit | 81034c52f8f1b227c55d8ae998963ad534073501 (patch) | |
tree | 222f528d48941f2d27ada5f88f577df8a8666084 | |
parent | 488cd7a81a9700b9d04805cf60f66d53a3a86084 (diff) | |
download | dotty-81034c52f8f1b227c55d8ae998963ad534073501.tar.gz dotty-81034c52f8f1b227c55d8ae998963ad534073501.tar.bz2 dotty-81034c52f8f1b227c55d8ae998963ad534073501.zip |
Fix #1323: change sbt interface dependency to allow artifact resolution by coursier
-rwxr-xr-x | bin/dotc | 41 | ||||
-rw-r--r-- | project/Build.scala | 5 |
2 files changed, 26 insertions, 20 deletions
@@ -122,30 +122,37 @@ CompilerMain=dotty.tools.dotc.Main FromTasty=dotty.tools.dotc.FromTasty ReplMain=dotty.tools.dotc.repl.Main +function find_jar { + # Usage: + # find_jar path/to/location file.jar + local artifact="$1/$2" + + if [ ! -f "$artifact" ]; then + artifact=$(find "$HOME/.coursier/cache" -iname "$2") + fi + + echo "$artifact" +} + # Autodetecting the scala-library location, in case it wasn't provided by an environment variable -if [ "$SCALA_LIBRARY_JAR" == "" ] -then - SCALA_LIBRARY_JAR=$HOME/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-$SCALA_VERSION.jar - # this is location where sbt stores it in ivy cache +if [ "$SCALA_LIBRARY_JAR" == "" ]; then + SCALA_LIBRARY_JAR=$(find_jar "$HOME/.ivy2/cache/org.scala-lang/scala-library/jars" "scala-library-$SCALA_VERSION.jar") fi -# save as for scala-library now for scala-reflect -if [ "$SCALA_REFLECT_JAR" == "" ] -then - SCALA_REFLECT_JAR=$HOME/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-$SCALA_VERSION.jar + +if [ "$SCALA_REFLECT_JAR" == "" ]; then + SCALA_REFLECT_JAR=$(find_jar "$HOME/.ivy2/cache/org.scala-lang/scala-reflect/jars" "scala-reflect-$SCALA_VERSION.jar") fi -if [ "$SCALA_COMPILER_JAR" == "" ] -then - SCALA_COMPILER_JAR=$HOME/.ivy2/cache/me.d-d/scala-compiler/jars/scala-compiler-$SCALA_COMPILER_VERSION.jar + +if [ "$SCALA_COMPILER_JAR" == "" ]; then + SCALA_COMPILER_JAR=$(find_jar "$HOME/.ivy2/cache/me.d-d/scala-compiler/jars" "scala-compiler-$SCALA_COMPILER_VERSION.jar") fi -if [ "$JLINE_JAR" == "" ] -then - JLINE_JAR=$HOME/.ivy2/cache/jline/jline/jars/jline-$JLINE_VERSION.jar +if [ "$JLINE_JAR" == "" ]; then + JLINE_JAR=$(find_jar "$HOME/.ivy2/cache/jline/jline/jars" "jline-$JLINE_VERSION.jar") fi -if [ "$SBT_INTERFACE_JAR" == "" ] -then - SBT_INTERFACE_JAR=$HOME/.ivy2/cache/org.scala-sbt/interface/jars/interface-$SBT_VERSION.jar +if [ "$SBT_INTERFACE_JAR" == "" ]; then + SBT_INTERFACE_JAR=$(find_jar "$HOME/.ivy2/cache/org.scala-sbt/interface/jars" "interface-$SBT_VERSION.jar") fi if [ ! -f "$SCALA_LIBRARY_JAR" -o ! -f "$SCALA_REFLECT_JAR" -o ! -f "$SCALA_COMPILER_JAR" -o ! -f "$JLINE_JAR" -o ! -f "$SBT_INTERFACE_JAR" ] diff --git a/project/Build.scala b/project/Build.scala index fc452f7f6..ecb0668bd 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -93,8 +93,7 @@ object DottyBuild extends Build { "org.scala-lang.modules" %% "scala-partest" % "1.0.11" % "test", "com.novocode" % "junit-interface" % "0.11" % "test", "jline" % "jline" % "2.12", - "org.scala-sbt" % "interface" % sbtVersion.value), - + "com.typesafe.sbt" % "sbt-interface" % sbtVersion.value), // enable improved incremental compilation algorithm incOptions := incOptions.value.withNameHashing(true), @@ -205,7 +204,7 @@ object DottyBuild extends Build { description := "sbt compiler bridge for Dotty", resolvers += Resolver.typesafeIvyRepo("releases"), libraryDependencies ++= Seq( - "org.scala-sbt" % "interface" % sbtVersion.value, + "com.typesafe.sbt" % "sbt-interface" % sbtVersion.value, "org.scala-sbt" % "api" % sbtVersion.value % "test", "org.specs2" %% "specs2" % "2.3.11" % "test" ), |