Skip to content

Commit

Permalink
Upgrade to Gradle 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Feb 22, 2024
1 parent 1085a02 commit 542ebe8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
3 changes: 0 additions & 3 deletions sonar/src/main/kotlin/com/bakdata/gradle/SonarPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

package com.bakdata.gradle

//import org.gradle.testing.jacoco.tasks.JacocoMerge

import org.gradle.api.GradleException
import org.gradle.api.Plugin
import org.gradle.api.Project
Expand All @@ -35,7 +33,6 @@ import org.gradle.api.tasks.SourceSetContainer
import org.gradle.api.tasks.testing.Test
import org.gradle.kotlin.dsl.*
import org.gradle.testing.jacoco.plugins.JacocoPluginExtension
import org.gradle.testing.jacoco.tasks.JacocoMerge
import org.gradle.testing.jacoco.tasks.JacocoReport

class SonarPlugin : Plugin<Project> {
Expand Down
9 changes: 1 addition & 8 deletions sonar/src/test/kotlin/com/bakdata/gradle/SonarPluginTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ import org.junit.jupiter.api.Test
internal class SonarPluginTest {
fun taskWithName(name: String): Condition<Task> = Condition({ it.name == name }, "Task with name $name")

fun causeWithMessage(message: String): Condition<Throwable> = Condition({ it.cause?.message?.contains(message) ?: false }, "Cause with message $message")

fun Project.evaluate() {
(this as DefaultProject).evaluate()
}
Expand Down Expand Up @@ -139,12 +137,7 @@ internal class SonarPluginTest {
val parent = ProjectBuilder.builder().withName("parent").build()
val child1 = ProjectBuilder.builder().withName("child1").withParent(parent).build()

// Error message is thrown when passing as Consumer to satisfies
// If original type is SAM type, then candidate should have same type constructor and corresponding function type
// originalExpectType: (java.util.function.Consumer<(ACTUAL..ACTUAL?)>..java.util.function.Consumer<(ACTUAL..ACTUAL?)>?), candidateExpectType: Nothing
// functionTypeByOriginal: (((ACTUAL..ACTUAL?)) -> kotlin.Unit..(((ACTUAL..ACTUAL?)) -> kotlin.Unit)?), functionTypeByCandidate: null
// Seems related to https://github.com/assertj/assertj/issues/2357
assertThatCode { child1.pluginManager.apply("com.bakdata.sonar") }
.satisfies(causeWithMessage("top-level project"))
.satisfies { assertThat(it.cause).hasMessageContaining("top-level project") }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ internal class SonatypePluginTest {

fun taskWithName(name: String): Condition<Task> = Condition({ it.name == name }, "Task with name $name")

fun causeWithMessage(message: String): Condition<Throwable> = Condition({ it.cause?.message?.contains(message) ?: false }, "Cause with message $message")

@Test
fun testSingleModuleProject() {
val project = ProjectBuilder.builder().build()
Expand Down Expand Up @@ -114,13 +112,8 @@ internal class SonatypePluginTest {
val parent = ProjectBuilder.builder().withName("parent").build()
val child1 = ProjectBuilder.builder().withName("child1").withParent(parent).build()

// Error message is thrown when passing as Consumer to satisfies
// If original type is SAM type, then candidate should have same type constructor and corresponding function type
// originalExpectType: (java.util.function.Consumer<(ACTUAL..ACTUAL?)>..java.util.function.Consumer<(ACTUAL..ACTUAL?)>?), candidateExpectType: Nothing
// functionTypeByOriginal: (((ACTUAL..ACTUAL?)) -> kotlin.Unit..(((ACTUAL..ACTUAL?)) -> kotlin.Unit)?), functionTypeByCandidate: null
// Seems related to https://github.com/assertj/assertj/issues/2357
Assertions.assertThatCode { child1.apply(plugin = "com.bakdata.sonatype") }
.satisfies(causeWithMessage("top-level project"))
.satisfies { Assertions.assertThat(it.cause).hasMessageContaining("top-level project") }
}

}
Expand Down

0 comments on commit 542ebe8

Please sign in to comment.