Last active
April 27, 2016 17:15
-
-
Save tovbinm/6494297a78bc9ddd24fb04f8e9f065d2 to your computer and use it in GitHub Desktop.
Scala repl with Gradle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task classpath << { | |
description 'Print project classpath.' | |
println sourceSets.main.runtimeClasspath.asPath | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
gradle compileScala | |
if [ $? == 0 ]; then | |
CLASSPATH=$(gradle classpath -q) | |
CP=$(echo $CLASSPATH | grep '/' | tr '\n ' ':' | tr ':' '\n' | sort | uniq | tr '\n' ':') | |
scala -Dscala.color -classpath $CP | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment