Add kotlin platform ID to imported gradle run tasks
It is necessary to determine a platform for the run tasks, for example, to hide run configurations for a some specific target.
This commit is contained in:
committed by
Space Team
parent
f78ffcb300
commit
bb0ddcbeba
@@ -112,20 +112,22 @@ val KotlinMultiplatformVersion?.isHmpp: Boolean
|
||||
interface ExternalSystemRunTask {
|
||||
val taskName: String
|
||||
val externalSystemProjectId: String
|
||||
val targetName: String?
|
||||
val targetName: String
|
||||
val kotlinPlatformId: String //one of id org.jetbrains.kotlin.idea.projectModel.KotlinPlatform
|
||||
}
|
||||
|
||||
data class ExternalSystemTestRunTask(
|
||||
override val taskName: String,
|
||||
override val externalSystemProjectId: String,
|
||||
override val targetName: String?
|
||||
override val targetName: String,
|
||||
override val kotlinPlatformId: String,
|
||||
) : ExternalSystemRunTask {
|
||||
|
||||
fun toStringRepresentation() = "$taskName|$externalSystemProjectId|$targetName"
|
||||
fun toStringRepresentation() = "$taskName|$externalSystemProjectId|$targetName|$kotlinPlatformId"
|
||||
|
||||
companion object {
|
||||
fun fromStringRepresentation(line: String) =
|
||||
line.split("|").let { if (it.size == 3) ExternalSystemTestRunTask(it[0], it[1], it[2]) else null }
|
||||
line.split("|").let { if (it.size == 4) ExternalSystemTestRunTask(it[0], it[1], it[2], it[3]) else null }
|
||||
}
|
||||
|
||||
override fun toString() = "$taskName@$externalSystemProjectId [$targetName]"
|
||||
@@ -134,10 +136,11 @@ data class ExternalSystemTestRunTask(
|
||||
data class ExternalSystemNativeMainRunTask(
|
||||
override val taskName: String,
|
||||
override val externalSystemProjectId: String,
|
||||
override val targetName: String?,
|
||||
override val targetName: String,
|
||||
val entryPoint: String,
|
||||
val debuggable: Boolean,
|
||||
) : ExternalSystemRunTask {
|
||||
override val kotlinPlatformId = "native"
|
||||
|
||||
fun toStringRepresentation() = "$taskName|$externalSystemProjectId|$targetName|$entryPoint|$debuggable"
|
||||
|
||||
@@ -152,7 +155,7 @@ data class ExternalSystemNativeMainRunTask(
|
||||
class KotlinFacetSettings {
|
||||
companion object {
|
||||
// Increment this when making serialization-incompatible changes to configuration data
|
||||
val CURRENT_VERSION = 5
|
||||
val CURRENT_VERSION = 6
|
||||
val DEFAULT_VERSION = 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user