Browse Source

Dependency updates

Switch Travis to JDK12

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

+ 2
- 2
.travis.yml View File

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

+ 12
- 12
build.gradle.kts View File

@@ -8,10 +8,10 @@ group = "com.dmdirc.ktirc"
8 8
 plugins {
9 9
     `maven-publish`
10 10
     jacoco
11
-    kotlin("jvm") version "1.3.21"
11
+    kotlin("jvm") version "1.3.31"
12 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 17
 jacoco {
@@ -25,7 +25,7 @@ configurations {
25 25
     all {
26 26
         resolutionStrategy.eachDependency {
27 27
             if (requested.group == "org.jetbrains.kotlin") {
28
-                useVersion("1.3.21")
28
+                useVersion("1.3.31")
29 29
             }
30 30
         }
31 31
     }
@@ -37,15 +37,15 @@ repositories {
37 37
 }
38 38
 
39 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 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 51
 java {
@@ -90,7 +90,7 @@ tasks {
90 90
     }
91 91
 
92 92
     withType<Wrapper> {
93
-        gradleVersion = "5.2.1"
93
+        gradleVersion = "5.4.1"
94 94
     }
95 95
 
96 96
     withType<KotlinCompile> {

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


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

@@ -1,5 +1,5 @@
1 1
 distributionBase=GRADLE_USER_HOME
2 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 4
 zipStoreBase=GRADLE_USER_HOME
5 5
 zipStorePath=wrapper/dists

+ 17
- 1
gradlew View File

@@ -1,5 +1,21 @@
1 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 21
 ##  Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
28 44
 APP_BASE_NAME=`basename "$0"`
29 45
 
30 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 49
 # Use the maximum available, or set MAX_FD != -1 to use that value.
34 50
 MAX_FD="maximum"

+ 17
- 1
gradlew.bat View File

@@ -1,3 +1,19 @@
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 17
 @if "%DEBUG%" == "" @echo off
2 18
 @rem ##########################################################################
3 19
 @rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
14 30
 set APP_HOME=%DIRNAME%
15 31
 
16 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 35
 @rem Find java.exe
20 36
 if defined JAVA_HOME goto findJavaFromJavaHome

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

@@ -57,7 +57,7 @@ internal class LineBufferedSocketImpl(coroutineScope: CoroutineScope, private va
57 57
         runBlocking {
58 58
             if (tls) {
59 59
                 with(SSLContext.getInstance("TLSv1.2")) {
60
-                    init(null, tlsTrustManager?.let { arrayOf(it) }, SecureRandom.getInstanceStrong())
60
+                    init(null, tlsTrustManager?.let { arrayOf(it) }, SecureRandom())
61 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,7 +136,7 @@ internal class ScramMechanism(private val algorithm: String, override val priori
136 136
 
137 137
     private val IrcClient.scramState: ScramState
138 138
         get() = with(serverState.sasl) {
139
-            (mechanismState as? ScramState ?: com.dmdirc.ktirc.sasl.ScramState()).apply {
139
+            (mechanismState as? ScramState ?: ScramState()).apply {
140 140
                 mechanismState = this
141 141
             }
142 142
         }
@@ -149,7 +149,7 @@ private class ScramException(message: String) : RuntimeException(message)
149 149
 
150 150
 private fun newNonce(): String {
151 151
     val charPool: List<Char> = (' '..'~') - ',' - '='
152
-    val random = SecureRandom.getInstanceStrong().asKotlinRandom()
152
+    val random = SecureRandom().asKotlinRandom()
153 153
     return (0..31).map { charPool.random(random) }.joinToString("")
154 154
 }
155 155
 

Loading…
Cancel
Save