Browse Source

Dependency updates

Switch Travis to JDK12

Switch to SecureRandom() instead of getStrongInstance() to avoid
blocking hideously.
master
Chris Smith 5 years ago
parent
commit
2c12fac16c

+ 2
- 2
.travis.yml View File

2
 language: java
2
 language: java
3
 jdk:
3
 jdk:
4
   - oraclejdk8
4
   - oraclejdk8
5
-  - oraclejdk11
5
+  - oraclejdk12
6
 before_install:
6
 before_install:
7
   - chmod +x gradlew
7
   - chmod +x gradlew
8
 script:
8
 script:
15
   script: ./gradlew clean bintrayUpload
15
   script: ./gradlew clean bintrayUpload
16
   on:
16
   on:
17
     tags: true
17
     tags: true
18
-    jdk: oraclejdk11
18
+    jdk: oraclejdk12

+ 12
- 12
build.gradle.kts View File

8
 plugins {
8
 plugins {
9
     `maven-publish`
9
     `maven-publish`
10
     jacoco
10
     jacoco
11
-    kotlin("jvm") version "1.3.21"
11
+    kotlin("jvm") version "1.3.31"
12
     id("com.jfrog.bintray") version "1.8.4"
12
     id("com.jfrog.bintray") version "1.8.4"
13
-    id("org.jetbrains.dokka") version "0.9.17"
14
-    id("name.remal.check-updates") version "1.0.113"
13
+    id("org.jetbrains.dokka") version "0.9.18"
14
+    id("name.remal.check-updates") version "1.0.130"
15
 }
15
 }
16
 
16
 
17
 jacoco {
17
 jacoco {
25
     all {
25
     all {
26
         resolutionStrategy.eachDependency {
26
         resolutionStrategy.eachDependency {
27
             if (requested.group == "org.jetbrains.kotlin") {
27
             if (requested.group == "org.jetbrains.kotlin") {
28
-                useVersion("1.3.21")
28
+                useVersion("1.3.31")
29
             }
29
             }
30
         }
30
         }
31
     }
31
     }
37
 }
37
 }
38
 
38
 
39
 dependencies {
39
 dependencies {
40
-    implementation(kotlin("stdlib-jdk8", "1.3.21"))
41
-    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.1")
42
-    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-io-jvm:0.1.7")
40
+    implementation(kotlin("stdlib-jdk8", "1.3.31"))
41
+    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.1")
42
+    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-io-jvm:0.1.8")
43
     compile(kotlin("reflect"))
43
     compile(kotlin("reflect"))
44
 
44
 
45
-    testImplementation("org.junit.jupiter:junit-jupiter-api:5.4.0")
46
-    testImplementation("org.junit.jupiter:junit-jupiter-params:5.4.0")
47
-    testImplementation("io.mockk:mockk:1.9.1")
48
-    testRuntime("org.junit.jupiter:junit-jupiter-engine:5.4.0")
45
+    testImplementation("org.junit.jupiter:junit-jupiter-api:5.4.2")
46
+    testImplementation("org.junit.jupiter:junit-jupiter-params:5.4.2")
47
+    testImplementation("io.mockk:mockk:1.9.3")
48
+    testRuntime("org.junit.jupiter:junit-jupiter-engine:5.4.2")
49
 }
49
 }
50
 
50
 
51
 java {
51
 java {
90
     }
90
     }
91
 
91
 
92
     withType<Wrapper> {
92
     withType<Wrapper> {
93
-        gradleVersion = "5.2.1"
93
+        gradleVersion = "5.4.1"
94
     }
94
     }
95
 
95
 
96
     withType<KotlinCompile> {
96
     withType<KotlinCompile> {

BIN
gradle/wrapper/gradle-wrapper.jar View File


+ 1
- 1
gradle/wrapper/gradle-wrapper.properties View File

1
 distributionBase=GRADLE_USER_HOME
1
 distributionBase=GRADLE_USER_HOME
2
 distributionPath=wrapper/dists
2
 distributionPath=wrapper/dists
3
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
3
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
4
 zipStoreBase=GRADLE_USER_HOME
4
 zipStoreBase=GRADLE_USER_HOME
5
 zipStorePath=wrapper/dists
5
 zipStorePath=wrapper/dists

+ 17
- 1
gradlew View File

1
 #!/usr/bin/env sh
1
 #!/usr/bin/env sh
2
 
2
 
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
+
3
 ##############################################################################
19
 ##############################################################################
4
 ##
20
 ##
5
 ##  Gradle start up script for UN*X
21
 ##  Gradle start up script for UN*X
28
 APP_BASE_NAME=`basename "$0"`
44
 APP_BASE_NAME=`basename "$0"`
29
 
45
 
30
 # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
46
 # 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='"-Xmx64m"'
47
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
32
 
48
 
33
 # Use the maximum available, or set MAX_FD != -1 to use that value.
49
 # Use the maximum available, or set MAX_FD != -1 to use that value.
34
 MAX_FD="maximum"
50
 MAX_FD="maximum"

+ 17
- 1
gradlew.bat View File

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
+
1
 @if "%DEBUG%" == "" @echo off
17
 @if "%DEBUG%" == "" @echo off
2
 @rem ##########################################################################
18
 @rem ##########################################################################
3
 @rem
19
 @rem
14
 set APP_HOME=%DIRNAME%
30
 set APP_HOME=%DIRNAME%
15
 
31
 
16
 @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
32
 @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="-Xmx64m"
33
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
18
 
34
 
19
 @rem Find java.exe
35
 @rem Find java.exe
20
 if defined JAVA_HOME goto findJavaFromJavaHome
36
 if defined JAVA_HOME goto findJavaFromJavaHome

+ 1
- 1
src/main/kotlin/com/dmdirc/ktirc/io/LineBufferedSocket.kt View File

57
         runBlocking {
57
         runBlocking {
58
             if (tls) {
58
             if (tls) {
59
                 with(SSLContext.getInstance("TLSv1.2")) {
59
                 with(SSLContext.getInstance("TLSv1.2")) {
60
-                    init(null, tlsTrustManager?.let { arrayOf(it) }, SecureRandom.getInstanceStrong())
60
+                    init(null, tlsTrustManager?.let { arrayOf(it) }, SecureRandom())
61
                     socket = TlsSocket(this@LineBufferedSocketImpl, socket, this, host)
61
                     socket = TlsSocket(this@LineBufferedSocketImpl, socket, this, host)
62
                 }
62
                 }
63
             }
63
             }

+ 2
- 2
src/main/kotlin/com/dmdirc/ktirc/sasl/ScramMechanism.kt View File

136
 
136
 
137
     private val IrcClient.scramState: ScramState
137
     private val IrcClient.scramState: ScramState
138
         get() = with(serverState.sasl) {
138
         get() = with(serverState.sasl) {
139
-            (mechanismState as? ScramState ?: com.dmdirc.ktirc.sasl.ScramState()).apply {
139
+            (mechanismState as? ScramState ?: ScramState()).apply {
140
                 mechanismState = this
140
                 mechanismState = this
141
             }
141
             }
142
         }
142
         }
149
 
149
 
150
 private fun newNonce(): String {
150
 private fun newNonce(): String {
151
     val charPool: List<Char> = (' '..'~') - ',' - '='
151
     val charPool: List<Char> = (' '..'~') - ',' - '='
152
-    val random = SecureRandom.getInstanceStrong().asKotlinRandom()
152
+    val random = SecureRandom().asKotlinRandom()
153
     return (0..31).map { charPool.random(random) }.joinToString("")
153
     return (0..31).map { charPool.random(random) }.joinToString("")
154
 }
154
 }
155
 
155
 

Loading…
Cancel
Save