summaryrefslogtreecommitdiffstats
path: root/run
blob: 8537d8e238a7f50d6b8005bd172d4a4e1953feb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! /bin/bash
[ -d out ] && rm -fr out

ARGS="desktop:run $@"

function gradlew_do()
{
    echo "./gradlew $ARGS" && ./gradlew $ARGS
}

case "$1" in
    "c")
        ARGS="clean packs $ARGS $@"
        gradlew_do
        ;;
    "a")
        ARGS="android:installDebug android:run $@"
        gradlew_do
        echo "on failure: sudo adb kill-server; (sudo adb start-server;) sudo adb devices"
        ;;
    "t")
        ARGS="core:test $@"
        gradlew_do
        ;;
    "j")
        ARGS="core:compileJava $@"
        gradlew_do
        ;;
    "d")
        ARGS="desktop:dist $@"
        gradlew_do
        mv ./desktop/build/libs/desktop-1.0.jar TankOnTank.jar
        ;;
    *)
        gradlew_do
        ;;
esac