Skip to content

Commit d10e47a

Browse files
TapchicomaSpace Team
authored and
Space Team
committed
[Gradle] Add KDoc for KotlinExecution
^KT-58858 In Progress
1 parent 1208eec commit d10e47a

File tree

1 file changed

+37
-17
lines changed
  • libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin

1 file changed

+37
-17
lines changed

libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinExecution.kt

+37-17
Original file line numberDiff line numberDiff line change
@@ -11,58 +11,78 @@ import org.gradle.api.tasks.TaskProvider
1111
import org.jetbrains.kotlin.gradle.plugin.KotlinExecution.ExecutionSource
1212

1313
/**
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.
1715
*
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.
1921
*/
2022
interface KotlinExecution<out SourceType : ExecutionSource> : Named {
23+
24+
/**
25+
* Represents an execution source that provides the necessary inputs to run the execution.
26+
*/
2127
interface ExecutionSource
2228

2329
/**
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].
2634
*/
2735
val executionSource: SourceType
2836
}
2937

3038
/**
31-
* @suppress TODO: KT-58858 add documentation
39+
* Represents an execution in the scope of a [KotlinTarget].
3240
*/
3341
interface KotlinTargetExecution<out SourceType : ExecutionSource> : KotlinExecution<SourceType> {
42+
43+
/**
44+
* The [KotlinTarget] that this execution belongs to.
45+
*/
3446
val target: KotlinTarget
3547
}
3648

3749
/**
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].
4051
*
41-
* See also: [CompilationExecutionSourceSupport].
52+
* @see [CompilationExecutionSourceSupport].
4253
*/
4354
interface CompilationExecutionSource<CompilationType : KotlinCompilation<*>> : ExecutionSource {
55+
56+
/**
57+
* The [KotlinCompilation] that this [ExecutionSource] belongs to.
58+
*/
4459
val compilation: CompilationType
4560
}
4661

4762
/**
48-
* @suppress TODO: KT-58858 add documentation
63+
* Provides methods to set a [KotlinCompilation] as an [ExecutionSource].
4964
*/
50-
@Suppress("deprecation")
65+
@Suppress("DEPRECATION")
5166
interface CompilationExecutionSourceSupport<in T : KotlinCompilationToRunnableFiles<*>> {
67+
5268
/**
53-
* Select a compilation to run the execution from.
69+
* Selects the compilation to run the execution from.
5470
*
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.
5773
*
58-
* This overrides other [KotlinExecution.executionSource] selection options.
74+
* Calling this method overwrites an already configured [KotlinExecution.executionSource].
5975
*/
6076
fun setExecutionSourceFrom(compilation: T)
6177
}
6278

6379
/**
64-
* @suppress TODO: KT-58858 add documentation
80+
* Provides a reference to the Gradle task that executes [KotlinExecution].
6581
*/
6682
interface ExecutionTaskHolder<T : Task> {
83+
84+
/**
85+
* Provides the Gradle task that executes the [KotlinExecution].
86+
*/
6787
val executionTask: TaskProvider<T>
6888
}

0 commit comments

Comments
 (0)