aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorBłażej Kardyś <bkardys@virtuslab.com>2020-05-19 19:02:58 +0200
committerBłażej Kardyś <bkardys@virtuslab.com>2020-05-20 13:31:00 +0200
commit6b85bb2ec2764a2c8b14717ef8e013a0f3c6e99f (patch)
treef29b4101c306d824f39787d817bd038fbf740779 /core/src
parentff450fedb3c8bdc318b55954bc37d93b30b9277c (diff)
downloaddokka-6b85bb2ec2764a2c8b14717ef8e013a0f3c6e99f.tar.gz
dokka-6b85bb2ec2764a2c8b14717ef8e013a0f3c6e99f.tar.bz2
dokka-6b85bb2ec2764a2c8b14717ef8e013a0f3c6e99f.zip
Merging of platform dependent hints in sourceset tree
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/kotlin/configuration.kt1
-rw-r--r--core/src/main/kotlin/defaultConfiguration.kt1
-rw-r--r--core/src/main/kotlin/model/SourceSetData.kt8
3 files changed, 8 insertions, 2 deletions
diff --git a/core/src/main/kotlin/configuration.kt b/core/src/main/kotlin/configuration.kt
index 88924924..e74d10d7 100644
--- a/core/src/main/kotlin/configuration.kt
+++ b/core/src/main/kotlin/configuration.kt
@@ -40,6 +40,7 @@ interface DokkaConfiguration {
val classpath: List<String>
val sourceRoots: List<SourceRoot>
val dependentSourceRoots: List<SourceRoot>
+ val dependentSourceSets: List<String>
val samples: List<String>
val includes: List<String>
val includeNonPublic: Boolean
diff --git a/core/src/main/kotlin/defaultConfiguration.kt b/core/src/main/kotlin/defaultConfiguration.kt
index 08f70b45..9f36606a 100644
--- a/core/src/main/kotlin/defaultConfiguration.kt
+++ b/core/src/main/kotlin/defaultConfiguration.kt
@@ -20,6 +20,7 @@ data class PassConfigurationImpl (
override val classpath: List<String>,
override val sourceRoots: List<SourceRootImpl>,
override val dependentSourceRoots: List<SourceRootImpl>,
+ override val dependentSourceSets: List<String>,
override val samples: List<String>,
override val includes: List<String>,
override val includeNonPublic: Boolean,
diff --git a/core/src/main/kotlin/model/SourceSetData.kt b/core/src/main/kotlin/model/SourceSetData.kt
index 8f67f272..964d5ca9 100644
--- a/core/src/main/kotlin/model/SourceSetData.kt
+++ b/core/src/main/kotlin/model/SourceSetData.kt
@@ -8,15 +8,19 @@ data class SourceSetData(
val moduleName: String,
val sourceSetName: String,
val platform: Platform,
- val sourceRoots: List<DokkaConfiguration.SourceRoot> = emptyList()
+ val sourceRoots: List<DokkaConfiguration.SourceRoot> = emptyList(),
+ val dependentSourceSets: List<String> = emptyList()
)
class SourceSetCache {
private val sourceSets = HashMap<String, SourceSetData>()
+ val allSourceSets: List<SourceSetData>
+ get() = sourceSets.values.toList()
+
fun getSourceSet(pass: DokkaConfiguration.PassConfiguration) =
sourceSets.getOrPut("${pass.moduleName}/${pass.sourceSetName}",
- { SourceSetData(pass.moduleName, pass.sourceSetName, pass.analysisPlatform, pass.sourceRoots) }
+ { SourceSetData(pass.moduleName, pass.sourceSetName, pass.analysisPlatform, pass.sourceRoots, pass.dependentSourceSets) }
)
}