From 16a07e82bce82715a171391c76412bb3cee10c17 Mon Sep 17 00:00:00 2001 From: "Alexander.Likhachev" Date: Mon, 5 Feb 2024 22:24:23 +0100 Subject: [PATCH] [BTA tests] Add KDoc to clarify meaning of some symbols ^KT-61860 In Progress --- .../compilation/model/AbstractModule.kt | 3 --- .../kotlin/compilation/model/Dependency.kt | 8 ++++++- .../kotlin/compilation/model/Module.kt | 24 +++++++++++++++++++ 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/compiler/build-tools/kotlin-build-tools-api-tests/src/testCommon/kotlin/compilation/model/AbstractModule.kt b/compiler/build-tools/kotlin-build-tools-api-tests/src/testCommon/kotlin/compilation/model/AbstractModule.kt index 6c166634ff5..c6af133602b 100644 --- a/compiler/build-tools/kotlin-build-tools-api-tests/src/testCommon/kotlin/compilation/model/AbstractModule.kt +++ b/compiler/build-tools/kotlin-build-tools-api-tests/src/testCommon/kotlin/compilation/model/AbstractModule.kt @@ -60,9 +60,6 @@ abstract class AbstractModule( override val icWorkingDir: Path get() = buildDirectory.resolve("ic") - override val snapshotFile: Path - get() = icWorkingDir.resolve("$moduleName.snapshot") - override val icCachesDir: Path get() = icWorkingDir.resolve("caches") diff --git a/compiler/build-tools/kotlin-build-tools-api-tests/src/testCommon/kotlin/compilation/model/Dependency.kt b/compiler/build-tools/kotlin-build-tools-api-tests/src/testCommon/kotlin/compilation/model/Dependency.kt index 500394ad656..08dd9116900 100644 --- a/compiler/build-tools/kotlin-build-tools-api-tests/src/testCommon/kotlin/compilation/model/Dependency.kt +++ b/compiler/build-tools/kotlin-build-tools-api-tests/src/testCommon/kotlin/compilation/model/Dependency.kt @@ -7,10 +7,16 @@ package org.jetbrains.kotlin.buildtools.api.tests.compilation.model import java.nio.file.Path +/** + * Represents a cache key used within the scenario DSL to provide initial build cacheability. + * Must properly override the [equals] and [hashCode] methods. + */ interface DependencyScenarioDslCacheKey interface Dependency { + /** + * File system location that may be used as a part of JVM classpath. + */ val location: Path - val snapshotFile: Path val scenarioDslCacheKey: DependencyScenarioDslCacheKey } \ No newline at end of file diff --git a/compiler/build-tools/kotlin-build-tools-api-tests/src/testCommon/kotlin/compilation/model/Module.kt b/compiler/build-tools/kotlin-build-tools-api-tests/src/testCommon/kotlin/compilation/model/Module.kt index afb0511fbb6..1728ca600db 100644 --- a/compiler/build-tools/kotlin-build-tools-api-tests/src/testCommon/kotlin/compilation/model/Module.kt +++ b/compiler/build-tools/kotlin-build-tools-api-tests/src/testCommon/kotlin/compilation/model/Module.kt @@ -15,11 +15,35 @@ import java.nio.file.Path interface Module : Dependency { val project: Project val moduleName: String + + /** + * Compiler arguments in the format of the Kotlin compiler CLI + */ val additionalCompilationArguments: List + + /** + * Directory containing all the source (.kt) files of the module + */ val sourcesDirectory: Path + + /** + * Directory containing all the files and directories that are produced during the compilation process + */ val buildDirectory: Path + + /** + * Directory containing compiler output (e.g. `.class` and `.kotlin_module` files) + */ val outputDirectory: Path + + /** + * Directory containing all the files and directories related to incremental compilation + */ val icWorkingDir: Path + + /** + * Directory containing caches required for incremental compilation + */ val icCachesDir: Path fun compile(