#!/bin/sh

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"

if [ "$1" == "-f" ]; then
    OPTS="-Pflat=true"
    shift
fi

if uname -s | grep -q "_NT"; then
    export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
fi


GRADLE="$DIR/gradlew"

if [ "$1" == "" ]; then

$GRADLE --project-dir $DIR -q $OPTS expandInteractive

else

echo "$@" | $GRADLE --project-dir $DIR -q $OPTS expandInteractive

fi
