[K/N][gradle][test] Fix repositories in the test and add another one
This commit is contained in:
committed by
Space Team
parent
6744702eff
commit
3b6de8b899
+22
-8
@@ -352,14 +352,7 @@ class NativeDownloadAndPlatformLibsIT : BaseGradleIT() {
|
|||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
gradleBuildScript().let {
|
gradleBuildScript().let {
|
||||||
val text = it.readText()
|
val text = it.readText().replaceFirst("// <MavenPlaceholder>", "maven(\"${mavenUrl()}\")")
|
||||||
.replaceFirst(
|
|
||||||
"mavenLocal()",
|
|
||||||
"""
|
|
||||||
mavenLocal()
|
|
||||||
maven("${mavenUrl()}")
|
|
||||||
""".trimIndent()
|
|
||||||
)
|
|
||||||
it.writeText(text)
|
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 ")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -5,6 +5,8 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
// <MavenPlaceholder>
|
||||||
|
mavenCentral()
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user