aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/configurationImplementations.kt2
-rw-r--r--runners/gradle-plugin/src/main/kotlin/dokkaTask.kt11
-rw-r--r--runners/gradle-plugin/src/main/kotlin/main.kt1
3 files changed, 9 insertions, 5 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/configurationImplementations.kt b/runners/gradle-plugin/src/main/kotlin/configurationImplementations.kt
index ccfa0b12..3e9db147 100644
--- a/runners/gradle-plugin/src/main/kotlin/configurationImplementations.kt
+++ b/runners/gradle-plugin/src/main/kotlin/configurationImplementations.kt
@@ -19,7 +19,7 @@ class GradleSourceRootImpl: DokkaConfiguration.SourceRoot, Serializable{
override fun toString(): String = path
}
-class GradlePassConfigurationImpl(@Transient val name: String = ""): DokkaConfiguration.PassConfiguration {
+open class GradlePassConfigurationImpl(@Transient val name: String = ""): DokkaConfiguration.PassConfiguration {
override var classpath: List<String> = emptyList()
override var moduleName: String = ""
override var sourceRoots: MutableList<DokkaConfiguration.SourceRoot> = mutableListOf()
diff --git a/runners/gradle-plugin/src/main/kotlin/dokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/dokkaTask.kt
index 9abd22ed..ed16a909 100644
--- a/runners/gradle-plugin/src/main/kotlin/dokkaTask.kt
+++ b/runners/gradle-plugin/src/main/kotlin/dokkaTask.kt
@@ -199,16 +199,19 @@ open class DokkaTask : DefaultTask() {
val gson = GsonBuilder().setPrettyPrinting().create()
+ val passConfigurationList =
+ ((this.extensions.getByName("passConfigurations") as Iterable<GradlePassConfigurationImpl>) +
+ (this.extensions.getByName("passConfiguration") as GradlePassConfigurationImpl))
+ .toList()
+ .map { defaultPassConfiguration(it) }
+
val configuration = GradleDokkaConfigurationImpl()
configuration.outputDir = outputDirectory
configuration.format = outputFormat
configuration.generateIndexPages = true
configuration.cacheRoot = cacheRoot
configuration.impliedPlatforms = impliedPlatforms
- configuration.passesConfigurations =
- (this.extensions.getByName("passConfigurations") as Iterable<GradlePassConfigurationImpl>)
- .toList()
- .map { defaultPassConfiguration(it) }
+ configuration.passesConfigurations = passConfigurationList
bootstrapProxy.configure(
BiConsumer { level, message ->
diff --git a/runners/gradle-plugin/src/main/kotlin/main.kt b/runners/gradle-plugin/src/main/kotlin/main.kt
index bde6458a..a5918b0b 100644
--- a/runners/gradle-plugin/src/main/kotlin/main.kt
+++ b/runners/gradle-plugin/src/main/kotlin/main.kt
@@ -19,6 +19,7 @@ open class DokkaPlugin : Plugin<Project> {
project.tasks.withType(DokkaTask::class.java) { task ->
val passConfiguration = project.container(GradlePassConfigurationImpl::class.java)
task.extensions.add("passConfigurations", passConfiguration)
+ task.extensions.create("passConfiguration", GradlePassConfigurationImpl::class.java, "")
}
}
}