Skip to content

Commit 1907f67

Browse files
committed
Update Gradle, Kotlin, RxJava
1 parent 1a5baf8 commit 1907f67

File tree

5 files changed

+160
-116
lines changed

5 files changed

+160
-116
lines changed

build.gradle

+39-26
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,53 @@
11
buildscript {
2-
ext.kotlin_version = '1.2.60'
3-
repositories { jcenter() }
4-
dependencies {
5-
classpath 'com.netflix.nebula:gradle-rxjava-project-plugin:4.0.0'
6-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
2+
repositories {
3+
jcenter()
74
}
85
}
96

7+
plugins {
8+
id "org.jetbrains.kotlin.jvm" version "1.3.40"
9+
}
10+
11+
repositories {
12+
jcenter()
13+
}
14+
1015
group = 'io.reactivex.rxjava2'
1116

17+
sourceSets {
18+
examples {
19+
java {
20+
compileClasspath += main.output
21+
runtimeClasspath += main.output
22+
}
23+
}
24+
}
1225

13-
apply plugin: 'nebula.rxjava-project'
14-
apply plugin: 'kotlin'
15-
apply plugin: 'java'
26+
configurations{
27+
examplesImplementation{
28+
extendsFrom(configurations.implementation)
29+
}
30+
}
1631

1732
dependencies {
18-
compile 'io.reactivex.rxjava2:rxjava:2.2.0'
19-
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
20-
testCompile 'org.funktionale:funktionale-partials:1.0.0-final'
21-
testCompile 'junit:junit:4.12'
22-
testCompile 'org.mockito:mockito-core:1.10.19'
23-
examplesCompile 'com.squareup.retrofit2:retrofit:2.3.0'
24-
examplesCompile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
25-
examplesCompile 'com.squareup.retrofit2:converter-moshi:2.3.0'
26-
}
33+
implementation 'io.reactivex.rxjava2:rxjava:2.2.10'
34+
implementation "org.jetbrains.kotlin:kotlin-stdlib"
2735

28-
task wrapper(type: Wrapper) {
29-
gradleVersion = '2.14'
36+
testImplementation 'org.funktionale:funktionale-partials:1.0.0-final'
37+
testImplementation 'junit:junit:4.12'
38+
testImplementation 'org.mockito:mockito-core:1.10.19'
39+
40+
examplesImplementation 'com.squareup.retrofit2:retrofit:2.6.0'
41+
examplesImplementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.0'
42+
examplesImplementation 'com.squareup.retrofit2:converter-moshi:2.6.0'
3043
}
3144

3245
// support for snapshot/final releases with the various branches RxJava uses
33-
nebulaRelease {
34-
addReleaseBranchPattern(/\d+\.\d+\.\d+/)
35-
addReleaseBranchPattern('HEAD')
36-
}
46+
//nebulaRelease {
47+
// addReleaseBranchPattern(/\d+\.\d+\.\d+/)
48+
// addReleaseBranchPattern('HEAD')
49+
//}
3750

38-
if (project.hasProperty('release.useLastTag')) {
39-
tasks.prepare.enabled = false
40-
}
51+
//if (project.hasProperty('release.useLastTag')) {
52+
// tasks.prepare.enabled = false
53+
//}

gradle/wrapper/gradle-wrapper.jar

1.38 KB
Binary file not shown.
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Sun Mar 05 07:47:21 SGT 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-all.zip

gradlew

+20-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/usr/bin/env sh
22

3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
319
##############################################################################
420
##
521
## Gradle start up script for UN*X
@@ -28,16 +44,16 @@ APP_NAME="Gradle"
2844
APP_BASE_NAME=`basename "$0"`
2945

3046
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS=""
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
3248

3349
# Use the maximum available, or set MAX_FD != -1 to use that value.
3450
MAX_FD="maximum"
3551

36-
warn ( ) {
52+
warn () {
3753
echo "$*"
3854
}
3955

40-
die ( ) {
56+
die () {
4157
echo
4258
echo "$*"
4359
echo
@@ -155,7 +171,7 @@ if $cygwin ; then
155171
fi
156172

157173
# Escape application args
158-
save ( ) {
174+
save () {
159175
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160176
echo " "
161177
}

gradlew.bat

+100-84
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,100 @@
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
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem http://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
17+
@if "%DEBUG%" == "" @echo off
18+
@rem ##########################################################################
19+
@rem
20+
@rem Gradle startup script for Windows
21+
@rem
22+
@rem ##########################################################################
23+
24+
@rem Set local scope for the variables with windows NT shell
25+
if "%OS%"=="Windows_NT" setlocal
26+
27+
set DIRNAME=%~dp0
28+
if "%DIRNAME%" == "" set DIRNAME=.
29+
set APP_BASE_NAME=%~n0
30+
set APP_HOME=%DIRNAME%
31+
32+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
34+
35+
@rem Find java.exe
36+
if defined JAVA_HOME goto findJavaFromJavaHome
37+
38+
set JAVA_EXE=java.exe
39+
%JAVA_EXE% -version >NUL 2>&1
40+
if "%ERRORLEVEL%" == "0" goto init
41+
42+
echo.
43+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
44+
echo.
45+
echo Please set the JAVA_HOME variable in your environment to match the
46+
echo location of your Java installation.
47+
48+
goto fail
49+
50+
:findJavaFromJavaHome
51+
set JAVA_HOME=%JAVA_HOME:"=%
52+
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
53+
54+
if exist "%JAVA_EXE%" goto init
55+
56+
echo.
57+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
58+
echo.
59+
echo Please set the JAVA_HOME variable in your environment to match the
60+
echo location of your Java installation.
61+
62+
goto fail
63+
64+
:init
65+
@rem Get command-line arguments, handling Windows variants
66+
67+
if not "%OS%" == "Windows_NT" goto win9xME_args
68+
69+
:win9xME_args
70+
@rem Slurp the command line arguments.
71+
set CMD_LINE_ARGS=
72+
set _SKIP=2
73+
74+
:win9xME_args_slurp
75+
if "x%~1" == "x" goto execute
76+
77+
set CMD_LINE_ARGS=%*
78+
79+
:execute
80+
@rem Setup the command line
81+
82+
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
83+
84+
@rem Execute Gradle
85+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
86+
87+
:end
88+
@rem End local scope for the variables with windows NT shell
89+
if "%ERRORLEVEL%"=="0" goto mainEnd
90+
91+
:fail
92+
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
93+
rem the _cmd.exe /c_ return code!
94+
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
95+
exit /b 1
96+
97+
:mainEnd
98+
if "%OS%"=="Windows_NT" endlocal
99+
100+
:omega

0 commit comments

Comments
 (0)