Skip to content

Commit 4923370

Browse files
committed
build: Kotlin 1.5.21
1 parent 49de94a commit 4923370

8 files changed

Lines changed: 13 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
### Housekeeping
88

99
- Sentry 4.2.0 -> 5.1.0
10+
- Kotlin 1.4.30 -> 1.5.21
1011
- Gradle 6.8.3 -> 7.2
1112

1213
## [0.11.0] (2021-02-23)

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ repositories {
1212
}
1313

1414
dependencies {
15-
implementation(kotlin("gradle-plugin", version = "1.4.30"))
15+
implementation(kotlin("gradle-plugin", version = "1.5.21"))
1616
}

buildSrc/src/main/kotlin/commons.gradle.kts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ dependencies {
2525
tasks.withType<KotlinCompile>().configureEach {
2626
kotlinOptions {
2727
jvmTarget = "1.8"
28-
apiVersion = "1.4"
29-
languageVersion = "1.4"
30-
freeCompilerArgs += "-Xjvm-default=enable"
28+
apiVersion = "1.5"
29+
languageVersion = "1.5"
30+
allWarningsAsErrors = true
31+
freeCompilerArgs += listOf(
32+
"-Xjvm-default=all",
33+
"-Xopt-in=kotlin.RequiresOptIn",
34+
)
3135
}
3236
}

inspector-api/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ plugins {
66
description = "Catch and report all exceptions"
77

88
dependencies {
9-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2")
9+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
1010
}

inspector-api/src/main/kotlin/report/CachingReporter.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package ru.endlesscode.inspector.report
22

3+
import kotlinx.coroutines.DelicateCoroutinesApi
34
import kotlinx.coroutines.GlobalScope
45
import kotlinx.coroutines.launch
56
import kotlinx.coroutines.runBlocking
@@ -31,6 +32,7 @@ public abstract class CachingReporter : Reporter {
3132
val exceptionData = ExceptionData(exception)
3233
handlers.beforeReport(message, exceptionData)
3334

35+
@OptIn(DelicateCoroutinesApi::class)
3436
val reportJob = GlobalScope.launch { report(message, exceptionData, handlers::onSuccess, handlers::onError) }
3537
if (!async) {
3638
runBlocking { reportJob.join() }

inspector-api/src/main/kotlin/report/ReportFields.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ public interface ReportField {
1111
public val value: String
1212
public val show: Boolean
1313

14-
@JvmDefault
1514
public fun render(
1615
short: Boolean = true,
1716
separator: String = ": ",

inspector-api/src/main/kotlin/report/Reporter.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ public interface Reporter {
1414
/**
1515
* Alias for [addHandler] method.
1616
*/
17-
@JvmDefault
1817
public fun addHandler(
1918
beforeReport: (String, ExceptionData) -> Unit = { _, _ -> },
2019
onSuccess: (String, ExceptionData) -> Unit = { _, _ -> },
@@ -45,7 +44,6 @@ public interface Reporter {
4544
/**
4645
* Report about [exception] with the [message] that describes when exception thrown (asynchronously).
4746
*/
48-
@JvmDefault
4947
public fun report(message: String, exception: Exception) {
5048
report(message, exception, async = true)
5149
}
@@ -63,7 +61,6 @@ public interface Reporter {
6361
* @param message The message that will be used as title
6462
* @param block Block that should be executed
6563
*/
66-
@JvmDefault
6764
public fun track(message: String, block: () -> Unit) {
6865
try {
6966
block.invoke()

sentry-bukkit/src/main/kotlin/SentryBukkitIntegration.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class SentryBukkitIntegration(private val plugin: Plugin) : Integration {
1616
}
1717

1818
private val Server.knownName: String
19-
get() = (KNOWN_SERVERS.find { it in version } ?: "Unknown").toLowerCase()
19+
get() = (KNOWN_SERVERS.find { it in version } ?: "Unknown").lowercase()
2020
private val Server.minecraftVersion: String
2121
get() = bukkitVersion.substringBefore('-')
2222

0 commit comments

Comments
 (0)