-
Notifications
You must be signed in to change notification settings - Fork 47
/
Types.kt
115 lines (98 loc) · 2.6 KB
/
Types.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
* Copyright 2017-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
package kotlinx.kover.gradle.plugin.commons
import kotlinx.kover.gradle.plugin.dsl.*
import org.gradle.api.*
import org.gradle.api.file.*
import org.gradle.api.model.ObjectFactory
import org.gradle.api.tasks.*
import org.gradle.workers.WorkerExecutor
import java.io.*
import java.math.BigDecimal
import javax.annotation.*
import javax.inject.*
/**
* The name of the author or the brand of the instrument.
*
* @param[binReportExtension] The coverage report file extension, without the first `.`
*/
internal enum class CoverageToolVendor(val binReportExtension: String) {
KOVER("ic"),
JACOCO("exec"),
}
/**
* Type of Kotlin plugin.
*/
internal enum class KotlinPluginType {
JVM,
MULTIPLATFORM,
ANDROID
}
/**
* Type of report variant.
*
* A variant can be created based on a specific origin, total for all origins, or it can be declared by a user.
*/
internal enum class ReportVariantType {
TOTAL,
JVM,
ANDROID,
CUSTOM
}
/**
* Type of Kotlin plugin, applied in a specific project.
*
* If no Kotlin plugin is used in this project, then [type] is `null`.
*/
internal class AppliedKotlinPlugin(val type: KotlinPluginType?)
internal class ReportContext(
val files: ArtifactContent,
val filters: ReportFilters,
val classpath: FileCollection,
val tempDir: File,
val projectPath: String,
val services: GradleReportServices
)
internal class GradleReportServices(
val antBuilder: AntBuilder,
val objects: ObjectFactory
)
internal data class ReportFilters(
@get:Input
val includesClasses: Set<String> = emptySet(),
@get:Input
val includesAnnotations: Set<String> = emptySet(),
@get:Input
val excludesClasses: Set<String> = emptySet(),
@get:Input
val excludesAnnotations: Set<String> = emptySet(),
@get:Input
val includeProjects: Set<String> = emptySet(),
@get:Input
val excludeProjects: Set<String> = emptySet(),
): Serializable
internal open class VerificationRule @Inject constructor(
@get:Input
val isEnabled: Boolean,
@get:Input
val name: String,
@get:Input
val entityType: GroupingEntityType,
@get:Nested
internal val bounds: List<VerificationBound>
): Serializable
internal open class VerificationBound(
@get:Input
@get:Nullable
@get:Optional
val minValue: BigDecimal?,
@get:Input
@get:Nullable
@get:Optional
val maxValue: BigDecimal?,
@get:Input
val metric: CoverageUnit,
@get:Input
val aggregation: AggregationType
): Serializable