Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,11 @@ organizationName in Global := "LAMP/EPFL"
organizationHomepage in Global := Some(url("http://lamp.epfl.ch"))

homepage in Global := Some(url("http://scala-lang.org"))

mainClass in (Compile, packageBin) := Some("dotty.tools.dotc.Main")

packageOptions in (Compile, packageBin) <+= (target, externalDependencyClasspath in Runtime) map {
(targetDirectory: File, classpath: Classpath) =>
val absolutePaths = classpath map { attrFile: Attributed[File] => attrFile.data.toPath().toString() };
Package.ManifestAttributes(java.util.jar.Attributes.Name.CLASS_PATH -> absolutePaths.reduceOption(_ + " " + _).getOrElse(""))
}
30 changes: 30 additions & 0 deletions dottyc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolute
SCALA_VERSION=2.11.0-M7
DOTTY_VERSION=0.1
MAIN_JAR=$MY_PATH/target/scala-$SCALA_VERSION/dotty_$SCALA_VERSION-$DOTTY_VERSION-SNAPSHOT.jar

function checkjar {
if [ ! -f "$1" ]
then
echo "The script is going to build the required jar file $1 by running \"sbt $2\" [5s until build]"
sleep 5
cd $MINIBOXING_PATH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINIBOXING_PATH?

sbt $2
cd -
if [ ! -f "$1" ]
then
echo "The required jar file has not been built by sbt. Please run \"sbt $2\""
exit 1
else
echo "The required jar file was built."
fi
fi
}

checkjar $MAIN_JAR package

java -jar $MAIN_JAR $@
#$SCALA_PATH/scalac -bootclasspath $RUNTIME_JAR:$PLUGIN_JAR -Xplugin:$PLUGIN_JAR $@