Skip to content

Commit 0774a93

Browse files
committed
build: upgrade to kotlin 1.4.0
1 parent ed7aed6 commit 0774a93

File tree

5 files changed

+25
-13
lines changed

5 files changed

+25
-13
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 3.1.5 (2020-08-30)
4+
5+
- Upgrade to kotlin 1.4.0
6+
37
## 3.1.4 (2020-07-19)
48

59
### Bug fixes

build.gradle.kts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1+
val atriumVersion = "0.12.0"
2+
val javaStringSimilarityVersion = "2.0.0"
3+
val jsonVersion = "20200518"
14
val kotlinVersion = "1.3.61"
5+
val mockkVersion = "1.10.0"
26
val fuelVersion = "2.2.1"
37
val spekVersion = "2.0.9"
48

59
plugins {
610
java
711
maven
8-
kotlin("jvm") version "1.3.61"
9-
id("org.jmailen.kotlinter") version "2.3.0"
12+
kotlin("jvm") version "1.4.0"
13+
id("org.jmailen.kotlinter") version "3.0.2"
1014
}
1115

1216
group = "com.github.AzurApi"
13-
version = "3.1.3"
17+
version = "3.1.5"
1418

1519
java {
1620
sourceCompatibility = JavaVersion.VERSION_1_8
@@ -26,14 +30,14 @@ dependencies {
2630
implementation(kotlin("stdlib-jdk8"))
2731
implementation("com.github.kittinunf.fuel:fuel:$fuelVersion")
2832
implementation("com.github.kittinunf.fuel:fuel-json:$fuelVersion")
29-
implementation("org.json", "json", "20190722")
30-
implementation("info.debatty", "java-string-similarity", "1.2.1")
33+
implementation("org.json:json:$jsonVersion")
34+
implementation("info.debatty:java-string-similarity:$javaStringSimilarityVersion")
3135

3236
testImplementation("org.spekframework.spek2:spek-dsl-jvm:$spekVersion")
3337
testRuntimeOnly("org.spekframework.spek2:spek-runner-junit5:$spekVersion")
3438
testRuntimeOnly("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
35-
testImplementation("io.mockk:mockk:1.9.3")
36-
testImplementation("ch.tutteli.atrium:atrium-fluent-en_GB:0.9.1")
39+
testImplementation("io.mockk:mockk:$mockkVersion")
40+
testImplementation("ch.tutteli.atrium:atrium-fluent-en_GB:$atriumVersion")
3741
}
3842

3943
tasks {

src/main/kotlin/com/github/azurapi/azurapikotlin/api/Atago.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ object Atago {
4747
*/
4848
fun getShipById(id: String, caseSensitive: Boolean = false): Ship {
4949
val formattedId = if (!caseSensitive) id.toLowerCase() else id
50-
return (if (!caseSensitive) database.shipsById.mapKeys { it.key.toLowerCase() } else
51-
database.shipsById)[formattedId] ?: throw ShipNotFoundException("Could not find ship with id: $id")
50+
return (
51+
if (!caseSensitive) database.shipsById.mapKeys { it.key.toLowerCase() } else
52+
database.shipsById
53+
)[formattedId] ?: throw ShipNotFoundException("Could not find ship with id: $id")
5254
}
5355

5456
/**

src/main/kotlin/com/github/azurapi/azurapikotlin/internal/json/Takao.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import com.github.azurapi.azurapikotlin.internal.utils.parser.jsonToShip
88
import com.github.kittinunf.fuel.httpGet
99
import com.github.kittinunf.fuel.json.responseJson
1010
import info.debatty.java.stringsimilarity.Cosine
11-
import java.util.Date
1211
import org.json.JSONObject
12+
import java.util.Date
1313

1414
/**
1515
* JSON deserializer object.
@@ -62,7 +62,8 @@ internal class Takao {
6262
jsonDatabase = loadJSON(TakaoInfo.JSON_SOURCE)
6363
for (shipId in jsonDatabase.keySet()) {
6464
val ship = jsonToShip(
65-
jsonDatabase.getJSONObject(shipId), shipId
65+
jsonDatabase.getJSONObject(shipId),
66+
shipId
6667
)
6768
shipsById[ship.id] = ship
6869
shipsByEnName[ship.names.en] = ship

src/test/kotlin/com/github/azurapi/azurapikotlin/internal/utils/parser/ShipParserSpec.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,11 @@ class ShipParserSpec : Spek({
303303
]
304304
}
305305
}
306-
""".trimIndent()
306+
""".trimIndent()
307307
)
308308
val atago = jsonToShip(
309-
json.optJSONObject("201"), "201"
309+
json.optJSONObject("201"),
310+
"201"
310311
)
311312
expect(atago.wikiUrl).toBe("https://azurlane.koumakan.jp/Atago")
312313
expect(atago.id).toBe("201")

0 commit comments

Comments
 (0)