Skip to content
Permalink
Browse files

Add 2.12.9 support (#418)

  • Loading branch information...
alexarchambault committed Aug 16, 2019
1 parent c6e16ca commit 0cba09bf40cebd90e926a31dabd938844041195b
@@ -40,10 +40,9 @@ jobs:
- pip3 -V
- sudo pip3 install -r examples/requirements.txt
script: scripts/setup-and-validate-examples.sh
- scala: 2.12.6
- scala: 2.12.7
- scala: 2.12.8
- scala: 2.12.8
- scala: 2.12.9
- scala: 2.12.9
jdk: openjdk11
- scala: 2.13.0
- name: "Website"
@@ -129,12 +129,15 @@ lazy val `scala-interpreter` = project
.settings(
shared,
libraryDependencies ++= {
CrossVersion.partialVersion(scalaBinaryVersion.value) match {
case Some((2, n)) if n == 12 =>
val sv = scalaVersion.value
if (sv.startsWith("2.12.")) {
val patch = sv.stripPrefix("2.12.").takeWhile(_.isDigit).toInt
if (patch <= 8)
Seq(Deps.metabrowseServer)
case _ =>
else
Nil
}
} else
Nil
},
libraryDependencies ++= Seq(
Deps.coursier,
@@ -0,0 +1,19 @@
package almond.internals

import almond.interpreter._
import almond.logger.LoggerContext
import ammonite.repl.api.Frame
import ammonite.util.Ref

final class ScalaInterpreterInspections(
logCtx: LoggerContext,
metabrowse: Boolean,
metabrowseHost: String,
metabrowsePort: Int,
pressy: => scala.tools.nsc.interactive.Global,
frames: => List[Frame]
) {
def inspect(code: String, pos: Int, detailLevel: Int): Option[Inspection] =
None
def shutdown(): Unit = ()
}
@@ -9,7 +9,7 @@ object Deps {
def ammonite = setting {
val sv = scalaVersion.value
if (sv.startsWith("2.11.")) "1.6.7"
else "1.6.9-15-6720d42"
else "1.6.9-19-827dffe"
}
def caseApp = "2.0.0-M9"
}
@@ -8,7 +8,7 @@ import sbt.Keys._

object Settings {

def scala212 = "2.12.8"
def scala212 = "2.12.9"
def scala213 = "2.13.0"

lazy val isAtLeast212 = Def.setting {
@@ -49,7 +49,7 @@ object Settings {

lazy val shared = Seq(
scalaVersion := scala213,
crossScalaVersions := Seq(scala213, scala212, "2.12.7", "2.12.6"),
crossScalaVersions := Seq(scala213, scala212, "2.12.8", "2.12.7", "2.12.6"),
scalacOptions ++= Seq(
// see http://tpolecat.github.io/2017/04/25/scalac-flags.html
"-deprecation",
@@ -78,6 +78,19 @@ object Settings {
Seq(baseDirectory.value / "src" / "main" / "scala-2.12_2.13")
case _ => Nil
}
},
unmanagedSourceDirectories.in(Compile) ++= {
val sv = scalaVersion.value
if (sv.startsWith("2.12.")) {
val patch = sv.stripPrefix("2.12.").takeWhile(_.isDigit).toInt
val dirName =
if (patch <= 8)
"scala-2.12.0_8"
else
"scala-2.12.9+"
Seq(baseDirectory.value / "src" / "main" / dirName)
} else
Nil
}
) ++ {
val prop = sys.props.getOrElse("publish.javadoc", "").toLowerCase(java.util.Locale.ROOT)
@@ -5,7 +5,7 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.."; pwd)"
mkdir -p "$DIR/target"

if [ ! -e "$DIR/target/coursier" ]; then
curl -Lo "$DIR/target/coursier" "https://github.com/coursier/coursier/raw/v1.1.0-M9/coursier"
curl -Lo "$DIR/target/coursier" "https://github.com/coursier/coursier/releases/download/v2.0.0-RC3-3/coursier"
chmod +x "$DIR/target/coursier"
fi

@@ -27,9 +27,10 @@ echo "Generating bootstrap"
../scripts/coursier.sh bootstrap \
-r sonatype:releases \
-r jitpack \
-i user -I user:sh.almond:scala-kernel-api_$SCALA_VERSION:$ALMOND_VERSION \
--shared sh.almond:scala-kernel-api_$SCALA_VERSION \
--sources --default=true \
--embed-files=false \
--scala-version "$SCALA_VERSION" \
sh.almond:scala-kernel_$SCALA_VERSION:$ALMOND_VERSION \
-o "$(pwd)/../project/target/launcher" \
-f

0 comments on commit 0cba09b

Please sign in to comment.
You can’t perform that action at this time.