Implement CommonizerIT.test KT-46856 filename too long - all native targets configured
Covers ^KT-46856
This commit is contained in:
committed by
Space
parent
54994a289f
commit
0749443f7e
+9
@@ -335,6 +335,15 @@ class CommonizerIT : BaseGradleIT() {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test KT-46856 filename too long - all native targets configured`() {
|
||||
with(Project("commonize-kt-46856-all-targets")) {
|
||||
build(":commonize") {
|
||||
assertSuccessful()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun preparedProject(name: String): Project {
|
||||
return Project(name).apply {
|
||||
setupWorkingDir()
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.AbstractKotlinNativeTargetPreset
|
||||
import org.jetbrains.kotlin.konan.target.HostManager.Companion.hostIsLinux
|
||||
import org.jetbrains.kotlin.konan.target.KonanTarget.LINUX_MIPS32
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
presets.forEach { preset ->
|
||||
if (preset is AbstractKotlinNativeTargetPreset) {
|
||||
// https://youtrack.jetbrains.com/issue/KT-46957
|
||||
if (hostIsLinux && preset.konanTarget == LINUX_MIPS32) {
|
||||
return@forEach
|
||||
}
|
||||
targetFromPreset(preset)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
kotlin.code.style=official
|
||||
|
||||
kotlin.mpp.enableGranularSourceSetsMetadata=true
|
||||
kotlin.native.enableDependencyPropagation=false
|
||||
kotlin.mpp.enableCInteropCommonization=true
|
||||
kotlin.mpp.enableHierarchicalCommonization=true
|
||||
kotlin.mpp.enableNativeDistributionCommonizationCache=false
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
val kotlin_version: String by settings
|
||||
plugins {
|
||||
kotlin("multiplatform").version(kotlin_version)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user