Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 21 additions & 13 deletions bin/dotc
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,27 @@
# This script is used for running compiler standalone(outside of sbt)
# it's based on miniboxing script and paulp's launcher script

# Try to autodetect real location of the script
DOTTY_ROOT="`readlink \"$0\"`" # relative, symbolic links resolved
if [[ "$DOTTY_ROOT" == "" ]]; then
DOTTY_ROOT="$0"
fi
DOTTY_ROOT="`dirname \"$DOTTY_ROOT\"`"
DOTTY_ROOT="`( cd \"$DOTTY_ROOT\" && pwd )`/.." # absolute

# Finds in dotty build file a line containing PATTERN
# returns last "" escaped string in this line
function getLastStringOnLineWith {
PATTERN="$1"
grep "$PATTERN" "$DOTTY_ROOT/project/Build.scala"|sed -n 's/.*\"\(.*\)\".*/\1/'p
}

# Configuration
SCALA_VERSION=2.11.5
SCALA_VERSION=$(getLastStringOnLineWith "scalaVersion in")
SCALA_BINARY_VERSION=2.11
SCALA_COMPILER_VERSION=2.11.5-20150416-144435-09c4a520e1
DOTTY_VERSION=0.1
JLINE_VERSION=2.12
SCALA_COMPILER_VERSION=$(getLastStringOnLineWith "scala-compiler")
DOTTY_VERSION=$(getLastStringOnLineWith "version in")
JLINE_VERSION=$(getLastStringOnLineWith "jline")
bootcp=true
default_java_opts="-Xmx768m -Xms768m"
programName=$(basename "$0")
Expand All @@ -25,16 +39,10 @@ CompilerMain=dotty.tools.dotc.Main
ReplMain=test.DottyRepl


# Try to autodetect real location of the script
DOTTY_ROOT="`readlink \"$0\"`" # relative, symbolic links resolved
if [[ "$DOTTY_ROOT" == "" ]]; then
DOTTY_ROOT="$0"
fi
DOTTY_ROOT="`dirname \"$DOTTY_ROOT\"`"
DOTTY_ROOT="`( cd \"$DOTTY_ROOT\" && pwd )`/.." # absolute

# autodetecting the compiler jar. this is location where sbt 'packages' it
MAIN_JAR=$DOTTY_ROOT/target/scala-$SCALA_BINARY_VERSION/dotty_$SCALA_BINARY_VERSION-$DOTTY_VERSION-SNAPSHOT.jar
TEST_JAR=$DOTTY_ROOT/target/scala-$SCALA_BINARY_VERSION/dotty_$SCALA_BINARY_VERSION-$DOTTY_VERSION-SNAPSHOT-tests.jar
MAIN_JAR=$DOTTY_ROOT/target/scala-$SCALA_BINARY_VERSION/dotty_$SCALA_BINARY_VERSION-$DOTTY_VERSION.jar
TEST_JAR=$DOTTY_ROOT/target/scala-$SCALA_BINARY_VERSION/dotty_$SCALA_BINARY_VERSION-$DOTTY_VERSION-tests.jar
function checkjar {
if [ ! -f "$1" ]
then
Expand Down
14 changes: 0 additions & 14 deletions build.sbt

This file was deleted.

7 changes: 7 additions & 0 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ object DottyBuild extends Build {
var partestLock: FileLock = null

val defaults = Defaults.defaultSettings ++ Seq(
scalaVersion in Global := "2.11.5",
version in Global := "0.1-SNAPSHOT",
organization in Global := "org.scala-lang",
organizationName in Global := "LAMP/EPFL",
organizationHomepage in Global := Some(url("http://lamp.epfl.ch")),
homepage in Global := Some(url("https://github.com/lampepfl/dotty")),

// set sources to src/, tests to test/ and resources to resources/
scalaSource in Compile := baseDirectory.value / "src",
javaSource in Compile := baseDirectory.value / "src",
Expand Down