Skip to content

Commit

Permalink
Allow to run with typelevel scala
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarchambault committed May 3, 2017
1 parent 9f265e9 commit abcf3a4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions jupyter-scala
Expand Up @@ -5,6 +5,10 @@ VERSION=0.4.1
AMMONIUM_VERSION=0.8.3
SCALA_VERSION=2.11.11 # Set to 2.12.2 for Scala 2.12

TYPELEVEL_SCALA=false # If true, set SCALA_VERSION above to a both ammonium + TLS available version (e.g. 2.11.8)

EXTRA_OPTS=()

if which coursier >/dev/null; then
GLOBAL_COURSIER=true
COURSIER=coursier
Expand All @@ -18,11 +22,23 @@ else
chmod +x "$COURSIER"
fi

if [ "$TYPELEVEL_SCALA" = true ]; then
EXTRA_OPTS+=(
-E org.scala-lang:scala-compiler \
-E org.scala-lang:scala-library \
-E org.scala-lang:scala-reflect \
-I ammonite:org.typelevel:scala-compiler:$SCALA_VERSION \
-I ammonite:org.typelevel:scala-library:$SCALA_VERSION \
-I ammonite:org.typelevel:scala-reflect:$SCALA_VERSION \
)
fi

"$COURSIER" launch \
-r sonatype:releases -r sonatype:snapshots \
-i ammonite \
-I ammonite:org.jupyter-scala:ammonite-runtime_$SCALA_VERSION:$AMMONIUM_VERSION \
-I ammonite:org.jupyter-scala:scala-api_$SCALA_VERSION:$VERSION \
${EXTRA_OPTS[@]} \
org.jupyter-scala:scala-cli_$SCALA_VERSION:$VERSION \
-- \
--id scala \
Expand Down

0 comments on commit abcf3a4

Please sign in to comment.