aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'runners/gradle-plugin')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/dokkaTask.kt5
-rw-r--r--runners/gradle-plugin/src/main/kotlin/main.kt7
2 files changed, 8 insertions, 4 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/dokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/dokkaTask.kt
index c95d1039..825830c5 100644
--- a/runners/gradle-plugin/src/main/kotlin/dokkaTask.kt
+++ b/runners/gradle-plugin/src/main/kotlin/dokkaTask.kt
@@ -183,9 +183,10 @@ open class DokkaTask : DefaultTask() {
val gson = GsonBuilder().setPrettyPrinting().create()
- val passConfigurationExtension: GradlePassConfigurationImpl? = this.extensions.findByName("passConfiguration") as GradlePassConfigurationImpl
+ val passConfigurationExtension: GradlePassConfigurationImpl? = this.extensions.findByName(
+ CONFIGURATION_EXTENSION_NAME) as GradlePassConfigurationImpl?
val passConfigurationsContainer by lazy {
- (this.extensions.getByName("passConfigurations") as Iterable<GradlePassConfigurationImpl>).toList()
+ (this.extensions.getByName(MULTIPLATFORM_EXTENSION_NAME) as Iterable<GradlePassConfigurationImpl>).toList()
}
passConfigurationExtension?.sourceRoots?.addAll(sourceRoots)
diff --git a/runners/gradle-plugin/src/main/kotlin/main.kt b/runners/gradle-plugin/src/main/kotlin/main.kt
index 865cba2f..dd216f89 100644
--- a/runners/gradle-plugin/src/main/kotlin/main.kt
+++ b/runners/gradle-plugin/src/main/kotlin/main.kt
@@ -6,6 +6,9 @@ import java.io.File
import java.io.InputStream
import java.util.*
+internal const val CONFIGURATION_EXTENSION_NAME = "configuration"
+internal const val MULTIPLATFORM_EXTENSION_NAME = "multiplatform"
+
open class DokkaPlugin : Plugin<Project> {
override fun apply(project: Project) {
@@ -18,8 +21,8 @@ open class DokkaPlugin : Plugin<Project> {
}
project.tasks.withType(DokkaTask::class.java) { task ->
val passConfiguration = project.container(GradlePassConfigurationImpl::class.java)
- task.extensions.add("multiplatform", passConfiguration)
- task.extensions.create("configuration", GradlePassConfigurationImpl::class.java, "")
+ task.extensions.add(MULTIPLATFORM_EXTENSION_NAME, passConfiguration)
+ task.extensions.create(CONFIGURATION_EXTENSION_NAME, GradlePassConfigurationImpl::class.java, "")
}
}
}