Skip to content

Commit

Permalink
Update Kotlin to 1.9.10, and related Maven packages. (jitsi#190)
Browse files Browse the repository at this point in the history
* Update Kotlin to 1.9.10, and related Maven packages.

Apply ktlint fixes from ktlint 0.50.0.

* Fix dokka version (used by release build).
  • Loading branch information
JonathanLennox authored Sep 27, 2023
1 parent 1f776be commit f49982f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 12 deletions.
7 changes: 6 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ insert_final_newline = true
charset = utf-8

[*.{kt,kts}]
max_line_length=120

# Comma-separated list of rules to disable (Since 0.34.0)
# Note that rules in any ruleset other than the standard ruleset will need to be prefixed
# by the ruleset identifier.
max_line_length=120

# I find trailing commas annoying
ktlint_standard_trailing-comma-on-call-site = disabled
ktlint_standard_trailing-comma-on-declaration-site = disabled

[pom.xml]
indent_style = space
Expand Down
2 changes: 1 addition & 1 deletion jicoco-metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.8.2</version>
<version>1.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,12 @@ open class MetricsContainer @JvmOverloads constructor(
/** the optional initial value of the metric */
initialValue: Long = 0
): CounterMetric {
val newName = if (name.endsWith("_total")) name else "${name}_total".also {
logger.debug("Counter '$name' was renamed to '$it' to ensure consistent metric naming.")
val newName = if (name.endsWith("_total")) {
name
} else {
"${name}_total".also {
logger.debug("Counter '$name' was renamed to '$it' to ensure consistent metric naming.")
}
}
if (metrics.containsKey(newName) or metrics.containsKey(name)) {
if (checkForNameConflicts) {
Expand Down
2 changes: 1 addition & 1 deletion jicoco-test-kotlin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<dependency>
<groupId>io.mockk</groupId>
<artifactId>mockk</artifactId>
<version>1.12.3</version>
<version>${mockk.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
Expand Down
4 changes: 2 additions & 2 deletions jicoco/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.8.2</version>
<version>1.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -149,7 +149,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.5.1</version>
<version>5.5.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
12 changes: 7 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>5.8.2</junit.version>
<kotlin.version>1.6.21</kotlin.version>
<kotest.version>5.3.0</kotest.version>
<junit.version>5.10.0</junit.version>
<kotlin.version>1.9.10</kotlin.version>
<kotest.version>5.7.2</kotest.version>
<mockk.version>1.13.8</mockk.version>
<prometheus.version>0.16.0</prometheus.version>
<dokka.version>1.9.0</dokka.version>
<jetty.version>11.0.14</jetty.version>
<jersey.version>3.0.10</jersey.version>
<smack.version>4.4.6</smack.version>
Expand Down Expand Up @@ -92,7 +94,7 @@
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<version>${dokka.version}</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -119,7 +121,7 @@
<plugin>
<groupId>com.github.gantsign.maven</groupId>
<artifactId>ktlint-maven-plugin</artifactId>
<version>1.13.1</version>
<version>2.0.0</version>
<configuration>
<sourceRoots>
<sourceRoot>${project.basedir}/src/main/kotlin</sourceRoot>
Expand Down

0 comments on commit f49982f

Please sign in to comment.