[build][report] serialization runtime 0.14.0
This commit is contained in:
@@ -44,7 +44,7 @@ dependencies {
|
|||||||
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion")
|
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion")
|
||||||
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
|
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
|
||||||
implementation("com.ullink.slack:simpleslackapi:1.2.0")
|
implementation("com.ullink.slack:simpleslackapi:1.2.0")
|
||||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.10.0")
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.14.0")
|
||||||
|
|
||||||
implementation("io.ktor:ktor-client-auth:1.2.1")
|
implementation("io.ktor:ktor-client-auth:1.2.1")
|
||||||
implementation("io.ktor:ktor-client-core:1.2.1")
|
implementation("io.ktor:ktor-client-core:1.2.1")
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
package org.jetbrains.kotlin
|
package org.jetbrains.kotlin
|
||||||
|
|
||||||
import groovy.lang.Closure
|
import groovy.lang.Closure
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.*
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.*
|
||||||
import org.gradle.api.Action
|
import org.gradle.api.Action
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.process.ExecResult
|
import org.gradle.process.ExecResult
|
||||||
@@ -420,11 +420,11 @@ private fun deviceLauncher(project: Project) = object : ExecutorService {
|
|||||||
}
|
}
|
||||||
return out.toString().run {
|
return out.toString().run {
|
||||||
check(isNotEmpty())
|
check(isNotEmpty())
|
||||||
@Serializable
|
@kotlinx.serialization.Serializable
|
||||||
data class DeviceTarget(val name: String, val udid: String, val state: String, val type: String)
|
data class DeviceTarget(val name: String, val udid: String, val state: String, val type: String)
|
||||||
split("\n")
|
split("\n")
|
||||||
.filter { it.isNotEmpty() }
|
.filter { it.isNotEmpty() }
|
||||||
.map { Json(strictMode = false).parse(DeviceTarget.serializer(), it) }
|
.map { Json(JsonConfiguration.Default).parse(DeviceTarget.serializer(), it) }
|
||||||
.first {
|
.first {
|
||||||
it.type == "device" && deviceName?.run { this == it.name } ?: true
|
it.type == "device" && deviceName?.run { this == it.name } ?: true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ package org.jetbrains.kotlin
|
|||||||
|
|
||||||
import kotlinx.io.PrintWriter
|
import kotlinx.io.PrintWriter
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.*
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.FileReader
|
import java.io.FileReader
|
||||||
|
|
||||||
|
|
||||||
@Serializable
|
@kotlinx.serialization.Serializable
|
||||||
data class ExternalTestReport(val statistics: Statistics, val groups: List<KonanTestGroupReport>)
|
data class ExternalTestReport(val statistics: Statistics, val groups: List<KonanTestGroupReport>)
|
||||||
|
|
||||||
@ImplicitReflectionSerializer
|
@ImplicitReflectionSerializer
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ enum class TestStatus {
|
|||||||
SKIPPED
|
SKIPPED
|
||||||
}
|
}
|
||||||
|
|
||||||
@Serializable
|
@kotlinx.serialization.Serializable
|
||||||
data class Statistics(
|
data class Statistics(
|
||||||
var passed: Int = 0,
|
var passed: Int = 0,
|
||||||
var failed: Int = 0,
|
var failed: Int = 0,
|
||||||
@@ -42,13 +42,13 @@ val Statistics.total: Int
|
|||||||
|
|
||||||
class TestFailedException(msg:String) : RuntimeException(msg)
|
class TestFailedException(msg:String) : RuntimeException(msg)
|
||||||
|
|
||||||
@Serializable
|
@kotlinx.serialization.Serializable
|
||||||
data class KonanTestGroupReport(val name:String, val suites:List<KonanTestSuiteReport>)
|
data class KonanTestGroupReport(val name:String, val suites:List<KonanTestSuiteReport>)
|
||||||
|
|
||||||
@Serializable
|
@kotlinx.serialization.Serializable
|
||||||
data class KonanTestSuiteReport(val name: String, val tests: List<KonanTestCaseReport>)
|
data class KonanTestSuiteReport(val name: String, val tests: List<KonanTestCaseReport>)
|
||||||
|
|
||||||
@Serializable
|
@kotlinx.serialization.Serializable
|
||||||
data class KonanTestCaseReport(val name:String, val status: TestStatus, @Optional val comment:String? = null)
|
data class KonanTestCaseReport(val name:String, val status: TestStatus, @Optional val comment:String? = null)
|
||||||
|
|
||||||
class KonanTestSuiteReportEnvironment(val name:String, val project: Project, val statistics: Statistics) {
|
class KonanTestSuiteReportEnvironment(val name:String, val project: Project, val statistics: Statistics) {
|
||||||
|
|||||||
Reference in New Issue
Block a user