Skip to content

Commit

Permalink
Add coverage for conflict with pinned embedded kotlin
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Merlin <paul@gradle.com>
  • Loading branch information
eskatos committed Sep 14, 2019
1 parent 82fb8ce commit bad68ed
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,29 @@ class EmbeddedKotlinProviderTest : AbstractKotlinIntegrationTest() {
assertThat(result.output, containsString("org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.31"))
assertThat(result.output, not(containsString("org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.31 ->")))
}

@Test
fun `fails with a reasonable message on conflict with embedded kotlin`() {
withBuildScript("""
buildscript {
$repositoriesBlock
dependencies {
classpath("org.jetbrains.kotlin:kotlin-stdlib") {
version { strictly("1.3.31") }
}
}
}
""")

val result = buildAndFail("buildEnvironment")

assertThat(
result.error,
containsString("Cannot find a version of 'org.jetbrains.kotlin:kotlin-stdlib' that satisfies the version constraints")
)
assertThat(
result.error,
containsString("because of the following reason: Pinned to the embedded Kotlin")
)
}
}

0 comments on commit bad68ed

Please sign in to comment.