[Test] Add new directive for specifying target platform for module
This commit is contained in:
committed by
TeamCityServer
parent
06b2efe65f
commit
73a63359df
+4
@@ -52,4 +52,8 @@ object ModuleStructureDirectives : SimpleDirectivesContainer() {
|
||||
Declares backend for analyzing current module
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
val TARGET_PLATFORM by enumDirective<TargetPlatformEnum>(
|
||||
"Declares target platform for current module"
|
||||
)
|
||||
}
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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.test.directives
|
||||
|
||||
import org.jetbrains.kotlin.config.JvmTarget
|
||||
import org.jetbrains.kotlin.platform.TargetPlatform
|
||||
import org.jetbrains.kotlin.platform.js.JsPlatforms
|
||||
import org.jetbrains.kotlin.platform.jvm.JdkPlatform
|
||||
import org.jetbrains.kotlin.platform.jvm.JvmPlatforms
|
||||
import org.jetbrains.kotlin.platform.konan.NativePlatformUnspecifiedTarget
|
||||
import org.jetbrains.kotlin.platform.konan.NativePlatforms
|
||||
|
||||
enum class TargetPlatformEnum(val targetPlatform: TargetPlatform) {
|
||||
Common(
|
||||
TargetPlatform(
|
||||
setOf(
|
||||
JdkPlatform(JvmTarget.DEFAULT),
|
||||
JsPlatforms.DefaultSimpleJsPlatform,
|
||||
NativePlatformUnspecifiedTarget
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
JVM(JvmPlatforms.unspecifiedJvmPlatform),
|
||||
JVM_1_6(JvmPlatforms.jvm16),
|
||||
JVM_1_8(JvmPlatforms.jvm18),
|
||||
|
||||
JS(JsPlatforms.defaultJsPlatform),
|
||||
Native(NativePlatforms.unspecifiedNativePlatform)
|
||||
}
|
||||
Reference in New Issue
Block a user