1 Star 0 Fork 0

李锐/Smack

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
repl 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
Florian Schmaus 提交于 2018-10-27 15:40 . Bump Ammonite REPL to 1.3.2
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
JDWP=false
JDWP_PORT=8000
while getopts djp: OPTION "$@"; do
case $OPTION in
d)
set -x
;;
j)
JDWP=true
;;
p)
JDWP_PORT=$OPTARG
;;
esac
done
EXTRA_JAVA_ARGS=()
if $JDWP; then
EXTRA_JAVA_ARGS+=("-Xdebug")
EXTRA_JAVA_ARGS+=("-Xrunjdwp:server=y,transport=dt_socket,address=${JDWP_PORT},suspend=n")
fi
PROJECT_ROOT=$(dirname "${BASH_SOURCE[0]}")
cd "${PROJECT_ROOT}"
echo "Compiling and computing classpath (May take a while)"
# Sadly even with the --quiet option Gradle (or some component of)
# will print the number of warnings/errors to stdout if there are
# any. So the result could look like
# 52 warnings\n1 warning\n12 warnings\n
# /smack/smack-repl/build/classes/main:/smack/smack-repl/build/
# resources/main:/smack/smack-tcp/build/libs/smack-tcp-4.2.0-alpha4-SNAPSHOT.jar
# So perform a "tail -n1" on the output of gradle
GRADLE_CLASSPATH="$(gradle :smack-repl:printClasspath --quiet |\
tail -n1)"
echo "Finished, starting REPL"
java "${EXTRA_JAVA_ARGS[@]}" \
-Dscala.usejavacp=true \
-classpath "${GRADLE_CLASSPATH}" \
ammonite.Main \
--predef "smack-repl/scala.repl"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lirui1100/Smack.git
git@gitee.com:lirui1100/Smack.git
lirui1100
Smack
Smack
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385