aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/model/SourceSetData.kt
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/kotlin/model/SourceSetData.kt')
-rw-r--r--core/src/main/kotlin/model/SourceSetData.kt23
1 files changed, 17 insertions, 6 deletions
diff --git a/core/src/main/kotlin/model/SourceSetData.kt b/core/src/main/kotlin/model/SourceSetData.kt
index 964d5ca9..7d118470 100644
--- a/core/src/main/kotlin/model/SourceSetData.kt
+++ b/core/src/main/kotlin/model/SourceSetData.kt
@@ -6,22 +6,33 @@ import org.jetbrains.dokka.plugability.DokkaContext
data class SourceSetData(
val moduleName: String,
- val sourceSetName: String,
+ val sourceSetID: String,
+ val displayName: String,
val platform: Platform,
val sourceRoots: List<DokkaConfiguration.SourceRoot> = emptyList(),
- val dependentSourceSets: List<String> = emptyList()
+ val dependentSourceSets: List<String> = emptyList()
)
class SourceSetCache {
private val sourceSets = HashMap<String, SourceSetData>()
val allSourceSets: List<SourceSetData>
- get() = sourceSets.values.toList()
+ get() = sourceSets.values.toList()
fun getSourceSet(pass: DokkaConfiguration.PassConfiguration) =
- sourceSets.getOrPut("${pass.moduleName}/${pass.sourceSetName}",
- { SourceSetData(pass.moduleName, pass.sourceSetName, pass.analysisPlatform, pass.sourceRoots, pass.dependentSourceSets) }
+ sourceSets.getOrPut("${pass.moduleName}/${pass.sourceSetID}",
+ {
+ SourceSetData(
+ pass.moduleName,
+ pass.sourceSetID,
+ pass.displayName,
+ pass.analysisPlatform,
+ pass.sourceRoots,
+ pass.dependentSourceSets
+ )
+ }
)
}
-fun DokkaContext.sourceSet(pass: DokkaConfiguration.PassConfiguration) : SourceSetData = sourceSetCache.getSourceSet(pass) \ No newline at end of file
+fun DokkaContext.sourceSet(pass: DokkaConfiguration.PassConfiguration): SourceSetData =
+ sourceSetCache.getSourceSet(pass) \ No newline at end of file