aboutsummaryrefslogtreecommitdiff
path: root/dokka-runners/dokkatoo/modules/dokkatoo-plugin/src/main/kotlin/dokka/parameters/DokkaModuleDescriptionSpec.kt
blob: af3e13b0b6c7d1ff4ba6bc6b55740f131a117643 (plain)
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
package org.jetbrains.dokka.dokkatoo.dokka.parameters

import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi
import javax.inject.Inject
import org.gradle.api.Named
import org.gradle.api.file.ConfigurableFileCollection
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Input
import org.jetbrains.dokka.DokkaConfiguration

/**
 * Properties that describe a Dokka Module.
 *
 * These values are passed into Dokka Generator, which will aggregate all provided Modules into a
 * single publication.
 */
@DokkatooInternalApi
abstract class DokkaModuleDescriptionSpec
@DokkatooInternalApi
@Inject constructor(
  @get:Input
  val moduleName: String,
) : Named {

  /**
   * @see DokkaConfiguration.DokkaModuleDescription.sourceOutputDirectory
   */
  @get:Input
  abstract val sourceOutputDirectory: RegularFileProperty

  /**
   * @see DokkaConfiguration.DokkaModuleDescription.includes
   */
  @get:Input
  abstract val includes: ConfigurableFileCollection

  /**
   * File path of the subproject that determines where the Dokka Module will be placed within an
   * assembled Dokka Publication.
   *
   * This must be a relative path, and will be appended to the root Dokka Publication directory.
   *
   * The Gradle project path will also be accepted ([org.gradle.api.Project.getPath]), and the
   * colons `:` will be replaced with file separators `/`.
   */
  @get:Input
  abstract val projectPath: Property<String>
}