aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/transformers/pages/samples
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-07-18 12:18:59 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-14 17:51:11 +0200
commiteae1ce49d18c2978b49166ea502bf2c109a85504 (patch)
tree477f39e33f14c71042f06eecc938d6efaa95e66c /plugins/base/src/main/kotlin/transformers/pages/samples
parent6c635551ed3ea0cfe5f04b54a98cb28225061d26 (diff)
downloaddokka-eae1ce49d18c2978b49166ea502bf2c109a85504.tar.gz
dokka-eae1ce49d18c2978b49166ea502bf2c109a85504.tar.bz2
dokka-eae1ce49d18c2978b49166ea502bf2c109a85504.zip
Simplify Dokka Gradle Plugin
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers/pages/samples')
-rw-r--r--plugins/base/src/main/kotlin/transformers/pages/samples/SamplesTransformer.kt10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/pages/samples/SamplesTransformer.kt b/plugins/base/src/main/kotlin/transformers/pages/samples/SamplesTransformer.kt
index 695ef050..f13e52ab 100644
--- a/plugins/base/src/main/kotlin/transformers/pages/samples/SamplesTransformer.kt
+++ b/plugins/base/src/main/kotlin/transformers/pages/samples/SamplesTransformer.kt
@@ -43,16 +43,16 @@ abstract class SamplesTransformer(val context: DokkaContext) : PageTransformer {
}
}
- private fun setUpAnalysis(context: DokkaContext) = context.configuration.sourceSets.map {
- it to AnalysisEnvironment(DokkaMessageCollector(context.logger), it.analysisPlatform).run {
+ private fun setUpAnalysis(context: DokkaContext) = context.configuration.sourceSets.map { sourceSet ->
+ sourceSet to AnalysisEnvironment(DokkaMessageCollector(context.logger), sourceSet.analysisPlatform).run {
if (analysisPlatform == Platform.jvm) {
addClasspath(PathUtil.getJdkClassesRootsFromCurrentJre())
}
- it.classpath.forEach { addClasspath(File(it)) }
+ sourceSet.classpath.forEach(::addClasspath)
- addSources(it.samples.map { it })
+ addSources(sourceSet.samples.toList())
- loadLanguageVersionSettings(it.languageVersion, it.apiVersion)
+ loadLanguageVersionSettings(sourceSet.languageVersion, sourceSet.apiVersion)
val environment = createCoreEnvironment()
val (facade, _) = createResolutionFacade(environment)