Skip to content

Commit

Permalink
build(deps): bump kotlin from 2.0.21 to 2.1.0 (#189)
Browse files Browse the repository at this point in the history
* build(deps): bump kotlin from 2.0.21 to 2.1.0

Bumps `kotlin` from 2.0.21 to 2.1.0.

Updates `org.jetbrains.kotlin:kotlin-bom` from 2.0.21 to 2.1.0
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v2.1.0/ChangeLog.md)
- [Commits](JetBrains/kotlin@v2.0.21...v2.1.0)

Updates `org.jetbrains.kotlin.jvm` from 2.0.21 to 2.1.0
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v2.1.0/ChangeLog.md)
- [Commits](JetBrains/kotlin@v2.0.21...v2.1.0)

Updates `org.jetbrains.kotlin.plugin.spring` from 2.0.21 to 2.1.0
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v2.1.0/ChangeLog.md)
- [Commits](JetBrains/kotlin@v2.0.21...v2.1.0)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-bom
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.jetbrains.kotlin.jvm
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.jetbrains.kotlin.plugin.spring
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): use version "1.5.0" of klint

to fix the spotlessKotlin task error:
```
java.lang.NoSuchFieldError: Class org.jetbrains.kotlin.lexer.KtTokens does not have member field 'org.jetbrains.kotlin.lexer.KtModifierKeywordToken HEADER_KEYWORD'
	at com.pinterest.ktlint.rule.engine.core.api.ElementType.<clinit>(ElementType.kt:274)
```

This is related to an incompatibility with Kotlin 2.1.0.
Refs:
- diffplug/spotless#2349
- https://github.com/pinterest/ktlint/releases/tag/1.5.0

* chore(deps): use version "1.5.0" of klint

run `./gradlew :spotlessApply` to fix spotless issues ✨

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eli Flores <eli.flores@digitalservice.bund.de>
  • Loading branch information
dependabot[bot] and eliflores authored Jan 2, 2025
1 parent 2062baf commit 57dca64
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 12 deletions.
7 changes: 4 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ reporting {
reportTask {
executionData.from(
configurations["aggregateCodeCoverageReportResults"]
.incoming.artifactView {
.incoming
.artifactView {
lenient(true)
withVariantReselection()
attributes {
Expand All @@ -197,10 +198,10 @@ sonar {

spotless {
kotlin {
ktlint()
ktlint("1.5.0")
}
kotlinGradle {
ktlint()
ktlint("1.5.0")
}
format("misc") {
target(
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
# @keep
jacoco = "0.8.12"
kotlin = "2.0.21"
kotlin = "2.1.0"
spring-boot = "3.4.1"

[libraries]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ class HealthEndpointIntegrationTest(
) {
@Test
fun `should expose health endpoint`() {
webTestClient.get().uri("/actuator/health").exchange().expectStatus().isOk()
webTestClient
.get()
.uri("/actuator/health")
.exchange()
.expectStatus()
.isOk()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ class HelloWorldIntegrationTest(
) {
@Test
fun `should expose hello world`() {
webTestClient.get().uri("/").exchange().expectStatus().isOk()
webTestClient
.get()
.uri("/")
.exchange()
.expectStatus()
.isOk()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ class SecurityTxtIntegrationTest(
@Test
fun `should expose security txt at well known location`() {
getSecurityTxt()
.expectStatus().isOk()
.expectHeader().contentType(MediaType.TEXT_PLAIN)
.expectBody().consumeWith { response ->
.expectStatus()
.isOk()
.expectHeader()
.contentType(MediaType.TEXT_PLAIN)
.expectBody()
.consumeWith { response ->
Assertions.assertThat(response.responseBody).isNotEmpty
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import org.springframework.security.web.server.SecurityWebFilterChain
@EnableWebFluxSecurity
class SecurityConfig {
@Bean
fun springSecurityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
return http.invoke {
fun springSecurityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain =
http.invoke {
authorizeExchange {
authorize("/.well-known/security.txt", permitAll)
authorize("/actuator/health", permitAll)
Expand All @@ -21,5 +21,4 @@ class SecurityConfig {
authorize(anyExchange, denyAll)
}
}
}
}

0 comments on commit 57dca64

Please sign in to comment.