Skip to content
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

Merged
merged 5 commits into from May 5, 2021

Conversation

rnett
Copy link
Contributor

@rnett rnett commented Apr 25, 2021

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?

@rnett rnett changed the title Specify older versions as a list of files, add option to use directory Add ability to specify older versions as a list of files Apr 25, 2021
@rnett
Copy link
Contributor Author

rnett commented May 1, 2021

I managed to fix my build issues by updating sass-loader to ^10.0.5 so that it supports node-sass 5+. Can I commit that here or should I open another PR?

Copy link
Contributor

@MarcinAman MarcinAman left a 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!" }
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@MarcinAman
Copy link
Contributor

I managed to fix my build issues by updating sass-loader to ^10.0.5 so that it supports node-sass 5+. Can I commit that here or should I open another PR?

Please do a PR. Thanks!

@rnett rnett requested a review from MarcinAman May 4, 2021 23:50
@MarcinAman MarcinAman merged commit e67274c into Kotlin:master May 5, 2021
@MarcinAman
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Versioning: option to specify list of files or glob instead of directory.
2 participants