[Commonizer] Add CommonizerIT test for ^KT-45350

Adding a test project containing commonization targets for
ios, linux and windows to test behaviour if at least one commonizer group
is fully not supported.
This commit is contained in:
sebastian.sellmair
2021-03-08 15:40:46 +01:00
committed by Space
parent 7dbb0c7d20
commit 6527452143
5 changed files with 82 additions and 0 deletions
@@ -0,0 +1,22 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.gradle
import kotlin.test.*
class CommonizerIT : BaseGradleIT() {
override val defaultGradleVersion: GradleVersionRequired = GradleVersionRequired.FOR_MPP_SUPPORT
@Test
fun testCommonizeNativeDistributionWithIosLinuxWindows() {
with(Project("commonizeNativeDistributionWithIosLinuxWindows")) {
build(":p1:runCommonizer") {
assertContains("Some Kotlin/Native targets cannot be built")
assertSuccessful()
}
}
}
}
@@ -0,0 +1,6 @@
allprojects {
repositories {
mavenLocal()
mavenCentral()
}
}
@@ -0,0 +1,4 @@
kotlin.code.style=official
kotlin.js.generate.executable.default=false
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false
@@ -0,0 +1,37 @@
plugins {
kotlin("multiplatform")
}
kotlin {
iosX64()
iosArm32()
linuxX64()
linuxArm64()
mingwX64("windowsX64")
mingwX86("windowsX86")
val commonMain by sourceSets.getting
val iosMain by sourceSets.creating
val linuxMain by sourceSets.creating
val windowsMain by sourceSets.creating
val iosX64Main by sourceSets.getting
val iosArm32Main by sourceSets.getting
val linuxX64Main by sourceSets.getting
val linuxArm64Main by sourceSets.getting
val windowsX64Main by sourceSets.getting
val windowsX86Main by sourceSets.getting
iosMain.dependsOn(commonMain)
linuxMain.dependsOn(commonMain)
windowsMain.dependsOn(commonMain)
iosX64Main.dependsOn(iosMain)
iosArm32Main.dependsOn(iosMain)
linuxX64Main.dependsOn(linuxMain)
linuxArm64Main.dependsOn(linuxMain)
windowsX64Main.dependsOn(windowsMain)
windowsX86Main.dependsOn(windowsMain)
}
@@ -0,0 +1,13 @@
pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
}
val kotlin_version: String by settings
plugins {
kotlin("multiplatform").version(kotlin_version)
}
}
include(":p1")