New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to specify older versions as a list of files #1890
Conversation
I managed to fix my build issues by updating |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the docs about versioning. An example of this style of configuration also would be nice to put there
var versionsOrdering: List<String>? = defaultVersionsOrdering, | ||
var version: String? = defaultVersion, | ||
) : ConfigurableBlock { | ||
internal fun versionFromConfigurationOrModule(dokkaContext: DokkaContext): String = | ||
version ?: dokkaContext.configuration.moduleVersion ?: "1.0" | ||
|
||
internal fun allOlderVersions(): List<File> { | ||
if (olderVersionsDir != null) | ||
assert(olderVersionsDir!!.isDirectory) { "Supplied previous version $olderVersionsDir is not a directory!" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are kotlin's smartcasts not working here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's since it's a var
. I could make it a ?.let
if it's an issue.
Please do a PR. Thanks! |
Thanks! |
Fixes #1889. I'm not aware of a good Java globbing implementation (the JDK one doesn't use base directories) unless you already have a dependency for one. If you do I can add a setter method.
The older version directory's subfolders and the older versions list are added together, so either or both can be specified. I don't love the
olderVersions
name but I couldn't think of a better one.additionalOlderVersions
maybe?