[K/N][gradle][test] Fix repositories in the test and add another one

This commit is contained in:
Pavel Punegov
2022-09-30 18:19:21 +02:00
committed by Space Team
parent 6744702eff
commit 3b6de8b899
2 changed files with 24 additions and 8 deletions
@@ -352,14 +352,7 @@ class NativeDownloadAndPlatformLibsIT : BaseGradleIT() {
""".trimIndent()
)
gradleBuildScript().let {
val text = it.readText()
.replaceFirst(
"mavenLocal()",
"""
mavenLocal()
maven("${mavenUrl()}")
""".trimIndent()
)
val text = it.readText().replaceFirst("// <MavenPlaceholder>", "maven(\"${mavenUrl()}\")")
it.writeText(text)
}
@@ -385,4 +378,25 @@ class NativeDownloadAndPlatformLibsIT : BaseGradleIT() {
}
}
}
@Test
fun `download from maven specified in the build and with parameter`() {
with(transformNativeTestProjectWithPluginDsl("native-download-maven")) {
gradleProperties().appendText(
"""
kotlin.native.distribution.mavenDownloadUrl=${mavenUrl()}
kotlin.native.distribution.downloadFromMaven=true
""".trimIndent()
)
gradleBuildScript().let {
val text = it.readText().replaceFirst("// <MavenPlaceholder>", "maven(\"${mavenUrl()}\")")
it.writeText(text)
}
build("assemble") {
assertSuccessful()
assertContains("Unpack Kotlin/Native compiler to ")
}
}
}
}
@@ -5,6 +5,8 @@ plugins {
}
repositories {
// <MavenPlaceholder>
mavenCentral()
mavenLocal()
}