Download native compiler in configuration stage
This commit is contained in:
committed by
Ilya Matveev
parent
5a64067601
commit
80bec0898f
+18
@@ -17,6 +17,7 @@ import org.junit.Test
|
||||
import java.util.jar.JarFile
|
||||
import java.util.zip.ZipFile
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertFalse
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
class NewMultiplatformIT : BaseGradleIT() {
|
||||
@@ -607,4 +608,21 @@ class NewMultiplatformIT : BaseGradleIT() {
|
||||
assertTrue(output.contains("Dependent: Published print"), "No test output found")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testNativeCompilerDownloading() {
|
||||
// The plugin shouldn't download the K/N compiler if there is no corresponding targets in the project.
|
||||
with(Project("new-mpp-lib-with-tests", gradleVersion)) {
|
||||
build("tasks") {
|
||||
assertSuccessful()
|
||||
assertFalse(output.contains("Kotlin/Native distribution: "))
|
||||
}
|
||||
}
|
||||
with(Project("new-mpp-native-libraries", gradleVersion)) {
|
||||
build("tasks") {
|
||||
assertSuccessful()
|
||||
assertTrue(output.contains("Kotlin/Native distribution: "))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user