@@ -11,58 +11,78 @@ import org.gradle.api.tasks.TaskProvider
11
11
import org.jetbrains.kotlin.gradle.plugin.KotlinExecution.ExecutionSource
12
12
13
13
/* *
14
- * @suppress TODO: KT-58858 add documentation
15
- * An execution of Kotlin code. Executions in a single family (e.g. test runs) are distinguished by [Named.getName].
16
- * Names may not be unique across different execution families, such as test runs of different targets.
14
+ * Represents the execution of Kotlin code, such as tests.
17
15
*
18
- * A particular kind of execution is a [KotlinTestRun] which runs tests.
16
+ * Executions within a single family, like test runs, are distinguished by [Named.getName].
17
+ * Names don't have to be globally unique across different execution families.
18
+ * For example, test runs of different targets can have the same name.
19
+ *
20
+ * [KotlinTestRun] is a specific type of execution that runs tests.
19
21
*/
20
22
interface KotlinExecution <out SourceType : ExecutionSource > : Named {
23
+
24
+ /* *
25
+ * Represents an execution source that provides the necessary inputs to run the execution.
26
+ */
21
27
interface ExecutionSource
22
28
23
29
/* *
24
- * The source of the executable code that this execution runs from. It is usually set via members of execution source support
25
- * interfaces, such as [CompilationExecutionSourceSupport] or [ClasspathTestRunSourceSupport], or `setExecutionSourceFrom*` functions.
30
+ * The source of the executable code that this execution runs.
31
+ *
32
+ * It is typically set via members of [ExecutionSource] support interfaces,
33
+ * such as [CompilationExecutionSourceSupport] or [ClasspathTestRunSourceSupport].
26
34
*/
27
35
val executionSource: SourceType
28
36
}
29
37
30
38
/* *
31
- * @suppress TODO: KT-58858 add documentation
39
+ * Represents an execution in the scope of a [KotlinTarget].
32
40
*/
33
41
interface KotlinTargetExecution <out SourceType : ExecutionSource > : KotlinExecution <SourceType > {
42
+
43
+ /* *
44
+ * The [KotlinTarget] that this execution belongs to.
45
+ */
34
46
val target: KotlinTarget
35
47
}
36
48
37
49
/* *
38
- * @suppress TODO: KT-58858 add documentation
39
- * An execution source that is produced by a [compilation].
50
+ * An execution source produced by a [compilation].
40
51
*
41
- * See also: [CompilationExecutionSourceSupport].
52
+ * @see [CompilationExecutionSourceSupport].
42
53
*/
43
54
interface CompilationExecutionSource <CompilationType : KotlinCompilation <* >> : ExecutionSource {
55
+
56
+ /* *
57
+ * The [KotlinCompilation] that this [ExecutionSource] belongs to.
58
+ */
44
59
val compilation: CompilationType
45
60
}
46
61
47
62
/* *
48
- * @suppress TODO: KT-58858 add documentation
63
+ * Provides methods to set a [KotlinCompilation] as an [ExecutionSource].
49
64
*/
50
- @Suppress(" deprecation " )
65
+ @Suppress(" DEPRECATION " )
51
66
interface CompilationExecutionSourceSupport <in T : KotlinCompilationToRunnableFiles <* >> {
67
+
52
68
/* *
53
- * Select a compilation to run the execution from.
69
+ * Selects the compilation to run the execution from.
54
70
*
55
- * The [compilation]'s [KotlinCompilationToRunnableFiles .runtimeDependencyFiles]
56
- * will be treated as runtime dependencies, and its [output] as runnable files.
71
+ * The [compilation]'s [KotlinCompilation .runtimeDependencyFiles]
72
+ * are treated as runtime dependencies, while its [KotlinCompilation. output] is treated as runnable files.
57
73
*
58
- * This overrides other [KotlinExecution.executionSource] selection options .
74
+ * Calling this method overwrites an already configured [KotlinExecution.executionSource].
59
75
*/
60
76
fun setExecutionSourceFrom (compilation : T )
61
77
}
62
78
63
79
/* *
64
- * @suppress TODO: KT-58858 add documentation
80
+ * Provides a reference to the Gradle task that executes [KotlinExecution].
65
81
*/
66
82
interface ExecutionTaskHolder <T : Task > {
83
+
84
+ /* *
85
+ * Provides the Gradle task that executes the [KotlinExecution].
86
+ */
67
87
val executionTask: TaskProvider <T >
68
88
}
0 commit comments