Skip to content

Commit 74f7b15

Browse files
committed
Working
0 parents  commit 74f7b15

22 files changed

+1554
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
build/
2+
.gradle
3+
.idea
4+
local.properties
5+
*.iml

build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apply plugin: 'java'
2+
apply plugin: "idea"
3+
apply plugin: "net.ltgt.apt"
4+
5+
dependencies {
6+
compileOnly "com.google.auto.value:auto-value:1.2"
7+
apt "com.google.auto.value:auto-value:1.2"
8+
compile 'com.google.guava:guava:20.0'
9+
10+
testCompile 'junit:junit:4.12'
11+
12+
targetCompatibility="1.7"
13+
sourceCompatibility="1.7"
14+
}

gradle/wrapper/gradle-wrapper.jar

52.3 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Fri Oct 14 14:13:22 PDT 2016
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

gradlew

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
#!/usr/bin/env bash
2+
3+
##############################################################################
4+
##
5+
## Gradle start up script for UN*X
6+
##
7+
##############################################################################
8+
9+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10+
DEFAULT_JVM_OPTS=""
11+
12+
APP_NAME="Gradle"
13+
APP_BASE_NAME=`basename "$0"`
14+
15+
# Use the maximum available, or set MAX_FD != -1 to use that value.
16+
MAX_FD="maximum"
17+
18+
warn ( ) {
19+
echo "$*"
20+
}
21+
22+
die ( ) {
23+
echo
24+
echo "$*"
25+
echo
26+
exit 1
27+
}
28+
29+
uri_parse() {
30+
# uri capture
31+
uri="$@"
32+
33+
# safe escaping
34+
uri="${uri//\`/%60}"
35+
uri="${uri//\"/%22}"
36+
37+
# top level parsing
38+
pattern='^(([a-z]{3,5})://)?((([^:\/]+)(:([^@\/]*))?@)?([^:\/?]+)(:([0-9]+))?)(\/[^?]*)?(\?[^#]*)?(#.*)?$'
39+
[[ "$uri" =~ $pattern ]] || return 1;
40+
41+
# component extraction
42+
uri=${BASH_REMATCH[0]}
43+
uri_schema=${BASH_REMATCH[2]}
44+
uri_address=${BASH_REMATCH[3]}
45+
uri_user=${BASH_REMATCH[5]}
46+
uri_password=${BASH_REMATCH[7]}
47+
uri_host=${BASH_REMATCH[8]}
48+
uri_port=${BASH_REMATCH[10]}
49+
uri_path=${BASH_REMATCH[11]}
50+
uri_query=${BASH_REMATCH[12]}
51+
uri_fragment=${BASH_REMATCH[13]}
52+
return 0;
53+
}
54+
55+
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
56+
57+
# OS specific support (must be 'true' or 'false').
58+
cygwin=false
59+
msys=false
60+
darwin=false
61+
case "`uname`" in
62+
CYGWIN* )
63+
cygwin=true
64+
;;
65+
Darwin* )
66+
darwin=true
67+
;;
68+
MINGW* )
69+
msys=true
70+
;;
71+
esac
72+
73+
# Attempt to set APP_HOME
74+
# Resolve links: $0 may be a link
75+
PRG="$0"
76+
# Need this for relative symlinks.
77+
while [ -h "$PRG" ] ; do
78+
ls=`ls -ld "$PRG"`
79+
link=`expr "$ls" : '.*-> \(.*\)$'`
80+
if expr "$link" : '/.*' > /dev/null; then
81+
PRG="$link"
82+
else
83+
PRG=`dirname "$PRG"`"/$link"
84+
fi
85+
done
86+
SAVED="`pwd`"
87+
cd "`dirname \"$PRG\"`/" >/dev/null
88+
APP_HOME="`pwd -P`"
89+
cd "$SAVED" >/dev/null
90+
91+
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
92+
93+
# Determine the Java command to use to start the JVM.
94+
if [ -n "$JAVA_HOME" ] ; then
95+
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
96+
# IBM's JDK on AIX uses strange locations for the executables
97+
JAVACMD="$JAVA_HOME/jre/sh/java"
98+
else
99+
JAVACMD="$JAVA_HOME/bin/java"
100+
fi
101+
if [ ! -x "$JAVACMD" ] ; then
102+
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
103+
104+
Please set the JAVA_HOME variable in your environment to match the
105+
location of your Java installation."
106+
fi
107+
else
108+
JAVACMD="java"
109+
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
110+
111+
Please set the JAVA_HOME variable in your environment to match the
112+
location of your Java installation."
113+
fi
114+
115+
# Increase the maximum file descriptors if we can.
116+
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
117+
MAX_FD_LIMIT=`ulimit -H -n`
118+
if [ $? -eq 0 ] ; then
119+
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
120+
MAX_FD="$MAX_FD_LIMIT"
121+
fi
122+
ulimit -n $MAX_FD
123+
if [ $? -ne 0 ] ; then
124+
warn "Could not set maximum file descriptor limit: $MAX_FD"
125+
fi
126+
else
127+
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
128+
fi
129+
fi
130+
131+
# For Darwin, add options to specify how the application appears in the dock
132+
if $darwin; then
133+
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
134+
fi
135+
136+
# For Cygwin, switch paths to Windows format before running java
137+
if $cygwin ; then
138+
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
139+
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
140+
JAVACMD=`cygpath --unix "$JAVACMD"`
141+
142+
# We build the pattern for arguments to be converted via cygpath
143+
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
144+
SEP=""
145+
for dir in $ROOTDIRSRAW ; do
146+
ROOTDIRS="$ROOTDIRS$SEP$dir"
147+
SEP="|"
148+
done
149+
OURCYGPATTERN="(^($ROOTDIRS))"
150+
# Add a user-defined pattern to the cygpath arguments
151+
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
152+
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
153+
fi
154+
# Now convert the arguments - kludge to limit ourselves to /bin/sh
155+
i=0
156+
for arg in "$@" ; do
157+
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
158+
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
159+
160+
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
161+
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
162+
else
163+
eval `echo args$i`="\"$arg\""
164+
fi
165+
i=$((i+1))
166+
done
167+
case $i in
168+
(0) set -- ;;
169+
(1) set -- "$args0" ;;
170+
(2) set -- "$args0" "$args1" ;;
171+
(3) set -- "$args0" "$args1" "$args2" ;;
172+
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
173+
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
174+
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
175+
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
176+
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
177+
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
178+
esac
179+
fi
180+
181+
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
182+
function splitJvmOpts() {
183+
JVM_OPTS=("$@")
184+
}
185+
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
186+
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
187+
188+
if [[ -n "$HTTP_PROXY" ]] && uri_parse "$HTTP_PROXY" ; then
189+
JVM_OPTS[${#JVM_OPTS[*]}]="-Dhttp.proxyPort=$uri_port"
190+
JVM_OPTS[${#JVM_OPTS[*]}]="-Dhttp.proxyHost=$uri_host"
191+
fi
192+
193+
if [[ -n "$HTTPS_PROXY" ]] && uri_parse "$HTTPS_PROXY" ; then
194+
JVM_OPTS[${#JVM_OPTS[*]}]="-Dhttps.proxyPort=$uri_port"
195+
JVM_OPTS[${#JVM_OPTS[*]}]="-Dhttps.proxyHost=$uri_host"
196+
fi
197+
198+
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

gradlew.bat

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
@if "%DEBUG%" == "" @echo off
2+
@rem ##########################################################################
3+
@rem
4+
@rem Gradle startup script for Windows
5+
@rem
6+
@rem ##########################################################################
7+
8+
@rem Set local scope for the variables with windows NT shell
9+
if "%OS%"=="Windows_NT" setlocal
10+
11+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12+
set DEFAULT_JVM_OPTS=
13+
14+
set DIRNAME=%~dp0
15+
if "%DIRNAME%" == "" set DIRNAME=.
16+
set APP_BASE_NAME=%~n0
17+
set APP_HOME=%DIRNAME%
18+
19+
@rem Find java.exe
20+
if defined JAVA_HOME goto findJavaFromJavaHome
21+
22+
set JAVA_EXE=java.exe
23+
%JAVA_EXE% -version >NUL 2>&1
24+
if "%ERRORLEVEL%" == "0" goto init
25+
26+
echo.
27+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28+
echo.
29+
echo Please set the JAVA_HOME variable in your environment to match the
30+
echo location of your Java installation.
31+
32+
goto fail
33+
34+
:findJavaFromJavaHome
35+
set JAVA_HOME=%JAVA_HOME:"=%
36+
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37+
38+
if exist "%JAVA_EXE%" goto init
39+
40+
echo.
41+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42+
echo.
43+
echo Please set the JAVA_HOME variable in your environment to match the
44+
echo location of your Java installation.
45+
46+
goto fail
47+
48+
:init
49+
@rem Get command-line arguments, handling Windowz variants
50+
51+
if not "%OS%" == "Windows_NT" goto win9xME_args
52+
if "%@eval[2+2]" == "4" goto 4NT_args
53+
54+
:win9xME_args
55+
@rem Slurp the command line arguments.
56+
set CMD_LINE_ARGS=
57+
set _SKIP=2
58+
59+
:win9xME_args_slurp
60+
if "x%~1" == "x" goto execute
61+
62+
set CMD_LINE_ARGS=%*
63+
goto execute
64+
65+
:4NT_args
66+
@rem Get arguments from the 4NT Shell from JP Software
67+
set CMD_LINE_ARGS=%$
68+
69+
:execute
70+
@rem Setup the command line
71+
72+
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73+
74+
@rem Execute Gradle
75+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76+
77+
:end
78+
@rem End local scope for the variables with windows NT shell
79+
if "%ERRORLEVEL%"=="0" goto mainEnd
80+
81+
:fail
82+
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83+
rem the _cmd.exe /c_ return code!
84+
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85+
exit /b 1
86+
87+
:mainEnd
88+
if "%OS%"=="Windows_NT" endlocal
89+
90+
:omega

src/main/java/Library.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
public class Library {
2+
public boolean someLibraryMethod() {
3+
return true;
4+
}
5+
}

0 commit comments

Comments
 (0)