aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/model/SourceSetData.kt
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-05-20 12:05:26 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-06-15 13:15:30 +0200
commitf3baf10b4c882230d382bfcdd94163d070bd0e25 (patch)
tree128b63b10f05242cfce88da6714d9e04987b5651 /core/src/main/kotlin/model/SourceSetData.kt
parent645e02fb42bbf1cd3ee2773a014ea1e553e09229 (diff)
downloaddokka-f3baf10b4c882230d382bfcdd94163d070bd0e25.tar.gz
dokka-f3baf10b4c882230d382bfcdd94163d070bd0e25.tar.bz2
dokka-f3baf10b4c882230d382bfcdd94163d070bd0e25.zip
Rework dokka configuration and Gradle plugin
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