Skip to content

Commit f66516e

Browse files
AYastrebovSpace Team
authored andcommitted
[Gradle] Added tests for accessing target's publishable property
^KT-81134
1 parent 7aad8e5 commit f66516e

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright 2010-2025 JetBrains s.r.o. and Kotlin Programming Language contributors.
3+
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
4+
*/
5+
6+
@file:Suppress("FunctionName")
7+
8+
package org.jetbrains.kotlin.gradle.unitTests
9+
10+
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
11+
import org.jetbrains.kotlin.gradle.dsl.multiplatformExtension
12+
import org.jetbrains.kotlin.gradle.util.buildProjectWithMPP
13+
import org.jetbrains.kotlin.gradle.util.kotlin
14+
import org.junit.Test
15+
16+
class CrossCompilationPublishingTests {
17+
18+
@Test
19+
fun `test KT-81134 Gradle configuration failure when accessing publishable property`() {
20+
with(buildProjectWithMPP {
21+
kotlin {
22+
macosX64()
23+
linuxX64()
24+
mingwX64()
25+
}
26+
}) {
27+
multiplatformExtension.targets.withType(KotlinNativeTarget::class.java).configureEach { nativeTarget ->
28+
nativeTarget.publishable
29+
}
30+
31+
evaluate()
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)