Skip to content

Commit baa511d

Browse files
Document and fix layout
1 parent 495cca0 commit baa511d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ksp/src/main/kotlin/io/spine/tools/core/jvm/ksp/gradle/CommonKspSettingsPlugin.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,22 @@ import org.gradle.api.Project
4848
import org.gradle.api.file.DirectoryProperty
4949
import org.gradle.kotlin.dsl.findByType
5050

51+
/**
52+
* Applies and configures the KSP plugin with the setting common to all [KspBasedPlugin]s.
53+
*
54+
* This plugin is applied by a [KspBasedPlugin] in its [apply][KspBasedPlugin.apply] function.
55+
*/
5156
public class CommonKspSettingsPlugin : Plugin<Project> {
5257

5358
override fun apply(project: Project): Unit = project.run {
5459
applyKspPlugin()
55-
5660
useKsp2()
5761
addDependencies()
5862
makeKspIgnoreProtocOutputDir()
5963
addSourcesGeneratedBySpineCompiler()
6064
makeKspTasksDependOnSpineCompiler()
6165
makeCompileKotlinTasksDependOnKspTasks()
6266
replaceKspOutputDirs()
63-
6467
}
6568

6669
private fun Project.addDependencies() {
@@ -72,7 +75,6 @@ public class CommonKspSettingsPlugin : Plugin<Project> {
7275
)
7376
}
7477
}
75-
7678
}
7779

7880
internal val Project.kspExtension: KspExtension?
@@ -88,7 +90,6 @@ private val Project.protocOutputDir: File?
8890
return path?.let { File(it) }
8991
}
9092

91-
9293
/**
9394
* Applies [KspGradlePlugin], if it is not yet added, to this project.
9495
*/

0 commit comments

Comments
 (0)