Instantly share code, notes, and snippets.

Embed
What would you like to do?
Scala repl with Gradle
task classpath << {
description 'Print project classpath.'
println sourceSets.main.runtimeClasspath.asPath
}
#!/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