Skip to content

Commit ce1d30e

Browse files
committed
Upgraded to Gradle 4.5.1 and Kotlin 1.2.21
1 parent 875ad7d commit ce1d30e

File tree

7 files changed

+103
-103
lines changed

7 files changed

+103
-103
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.gradle/
22
build/
33
.idea/
4+
*.iml

build.gradle

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
plugins {
2-
id 'nebula.kotlin' version '1.0.3'
3-
id 'nebula.project' version '3.3.0'
4-
id 'nebula.release' version '4.1.0'
5-
id 'nebula.maven-publish' version '4.9.1'
6-
id 'nebula.nebula-bintray' version '3.3.4'
2+
id 'nebula.kotlin' version '1.2.21'
3+
id 'nebula.project' version '3.4.0'
4+
id 'nebula.release' version '6.3.0'
5+
id 'nebula.maven-publish' version '7.0.1'
6+
id 'nebula.nebula-bintray' version '3.5.2'
77
}
88

99
group 'au.com.console'
@@ -53,5 +53,5 @@ bintray {
5353
}
5454

5555
task wrapper(type: Wrapper) {
56-
gradleVersion = "3.0"
56+
gradleVersion = "4.5.1"
5757
}

gradle/wrapper/gradle-wrapper.jar

-738 Bytes
Binary file not shown.
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Thu Sep 15 21:26:16 AEST 2016
1+
#Tue Feb 20 13:21:37 AEST 2018
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-bin.zip

gradlew

+5
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,9 @@ function splitJvmOpts() {
161161
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162162
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163163

164+
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
165+
if [[ "$(uname)" == "Darwin" ]] && [[ "$HOME" == "$PWD" ]]; then
166+
cd "$(dirname "$0")"
167+
fi
168+
164169
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

gradlew.bat

+84-90
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,84 @@
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-
set DIRNAME=%~dp0
12-
if "%DIRNAME%" == "" set DIRNAME=.
13-
set APP_BASE_NAME=%~n0
14-
set APP_HOME=%DIRNAME%
15-
16-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS=
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 Windows 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
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+
set DIRNAME=%~dp0
12+
if "%DIRNAME%" == "" set DIRNAME=.
13+
set APP_BASE_NAME=%~n0
14+
set APP_HOME=%DIRNAME%
15+
16+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17+
set DEFAULT_JVM_OPTS=
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 Windows variants
50+
51+
if not "%OS%" == "Windows_NT" goto win9xME_args
52+
53+
:win9xME_args
54+
@rem Slurp the command line arguments.
55+
set CMD_LINE_ARGS=
56+
set _SKIP=2
57+
58+
:win9xME_args_slurp
59+
if "x%~1" == "x" goto execute
60+
61+
set CMD_LINE_ARGS=%*
62+
63+
:execute
64+
@rem Setup the command line
65+
66+
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67+
68+
@rem Execute Gradle
69+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70+
71+
:end
72+
@rem End local scope for the variables with windows NT shell
73+
if "%ERRORLEVEL%"=="0" goto mainEnd
74+
75+
:fail
76+
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77+
rem the _cmd.exe /c_ return code!
78+
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79+
exit /b 1
80+
81+
:mainEnd
82+
if "%OS%"=="Windows_NT" endlocal
83+
84+
:omega

src/main/kotlin/au/com/console/jpaspecificationdsl/JPASpecificationDSL.kt

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fun <R> Path<*>.get(prop: KProperty1<*, R?>): Path<R> = this.get<R>(prop.name)
1313

1414
// Version of Specifications.where that makes the CriteriaBuilder implicit
1515
fun <T> where(makePredicate: CriteriaBuilder.(Root<T>) -> Predicate): Specifications<T> =
16-
Specifications.where<T> { root, criteriaQuery, criteriaBuilder -> criteriaBuilder.makePredicate(root) }
16+
Specifications.where<T> { root, _, criteriaBuilder -> criteriaBuilder.makePredicate(root) }
1717

1818
// helper function for defining Specifications that take a Path to a property and send it to a CriteriaBuilder
1919
private fun <T, R> KProperty1<T, R?>.spec(makePredicate: CriteriaBuilder.(path: Path<R>) -> Predicate): Specifications<T> =
@@ -60,7 +60,7 @@ fun <T> KProperty1<T, String?>.notLike(x: String): Specifications<T> = spec { no
6060
fun <T> KProperty1<T, String?>.notLike(x: String, escapeChar: Char): Specifications<T> = spec { notLike(it, x, escapeChar) }
6161

6262
// And
63-
infix fun <T> Specifications<T>.and(other: Specification<T>) = this.and(other)
63+
infix fun <T> Specifications<T>.and(other: Specification<T>): Specifications<T> = this.and(other)
6464
inline fun <reified T> and(vararg specs: Specifications<T>?): Specifications<T> {
6565
return and(specs.toList())
6666
}
@@ -69,7 +69,7 @@ inline fun <reified T> and(specs: Iterable<Specifications<T>?>): Specifications<
6969
}
7070

7171
// Or
72-
infix fun <T> Specifications<T>.or(other: Specification<T>) = this.or(other)
72+
infix fun <T> Specifications<T>.or(other: Specification<T>) : Specifications<T> = this.or(other)
7373
inline fun <reified T> or(vararg specs: Specifications<T>?): Specifications<T> {
7474
return or(specs.toList())
7575
}
@@ -78,11 +78,11 @@ inline fun <reified T> or(specs: Iterable<Specifications<T>?>): Specifications<T
7878
}
7979

8080
// Not
81-
operator fun <T> Specifications<T>.not() = Specifications.not(this)
81+
operator fun <T> Specifications<T>.not(): Specifications<T> = Specifications.not(this)
8282

8383
// Combines Specifications with an operation
8484
inline fun <reified T> combineSpecifications(specs: Iterable<Specification<T>?>, operation: Specifications<T>.(Specification<T>) -> Specifications<T>): Specifications<T> {
85-
return specs.filterNotNull().fold(emptySpecification<T>()) { existing, new -> existing.operation(new) }
85+
return specs.filterNotNull().fold(emptySpecification()) { existing, new -> existing.operation(new) }
8686
}
8787

8888
// Empty Specification

0 commit comments

Comments
 (0)