Skip to content

Commit

Permalink
Upgrade SonarPlugin for Gradle 8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Feb 21, 2024
1 parent aea4c42 commit 960c980
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions sonar/src/test/kotlin/com/bakdata/gradle/SonarPluginTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,7 @@ internal class SonarPluginTest {
val parent = ProjectBuilder.builder().withName("parent").build()
val child1 = ProjectBuilder.builder().withName("child1").withParent(parent).build()

// FIXME 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
// assertThatCode { child1.pluginManager.apply("com.bakdata.sonar") }
// .satisfies { assertThat(it.cause?.message).contains("top-level project") }
assertThatCode { child1.pluginManager.apply("com.bakdata.sonar") }
.satisfies { assertThat(it.cause).hasMessageContaining("top-level project") }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,8 @@ internal class SonatypePluginTest {
val parent = ProjectBuilder.builder().withName("parent").build()
val child1 = ProjectBuilder.builder().withName("child1").withParent(parent).build()

// FIXME 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
// Assertions.assertThatCode { child1.apply(plugin = "com.bakdata.sonatype") }
// .satisfies { Assertions.assertThat(it.cause?.message).contains("top-level project") }
Assertions.assertThatCode { child1.apply(plugin = "com.bakdata.sonatype") }
.satisfies { Assertions.assertThat(it.cause).hasMessageContaining("top-level project") }
}

}
Expand Down

0 comments on commit 960c980

Please sign in to comment.