-
Notifications
You must be signed in to change notification settings - Fork 409
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 example to demonstrate how to configure a custom Dokka plugin #3871
Open
adam-enko
wants to merge
20
commits into
master
Choose a base branch
from
adam/feat/KT-70336/custom-plugin-config-example
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 15 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
e4bea1a
Add example to demonstrate how to configure a custom Dokka plugin
adam-enko cb9888f
tidy
adam-enko 4a4163f
use buildJsonObject
adam-enko f7d9d09
tidy
adam-enko 3fe18ed
Merge branch 'master' into adam/feat/KT-70336/custom-plugin-config-ex…
adam-enko b9fc6c4
remove KxS dependency, and format
adam-enko 971bfcc
Merge branch 'master' into adam/feat/KT-70336/custom-plugin-config-ex…
adam-enko 54fc084
Fix custom-dokka-plugin example and update test
adam-enko 23ddc39
fix example
adam-enko e29288f
tidy/format
adam-enko a93644c
update expectedData
adam-enko 8be7132
add docs for testing a single project
adam-enko 06eb9e0
remove the hardcoded list of example projects
adam-enko 9c27397
tidy
adam-enko 4415d68
update test names
adam-enko b2cccd4
fix enabling/disabling the tests
adam-enko 4a5e488
Simplify example to use a single string property
adam-enko 8c87761
try to fix example projects CC
adam-enko a6cace7
Merge branch 'master' into adam/feat/KT-70336/custom-plugin-config-ex…
adam-enko ae3840e
Merge branch 'master' into adam/feat/KT-70336/custom-plugin-config-ex…
adam-enko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
* Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
package dokkabuild.utils | ||
|
||
/** Title case the first char of a string */ | ||
fun String.uppercaseFirstChar(): String = replaceFirstChar(Char::uppercaseChar) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 87 additions & 0 deletions
87
...ampleProjects/custom-dokka-plugin-example/html/-demo -library/demo/-greeter/-greeter.html
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
87 changes: 87 additions & 0 deletions
87
.../exampleProjects/custom-dokka-plugin-example/html/-demo -library/demo/-greeter/greet.html
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nit: we discussed this in the previous PR, but I still feel that it would be more conventional to have a generated
testGen
source directory (under git and with an idempotency check) than a per test project Gradle taskThere 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.
One of the benefits is that you could then run an arbitrary subset of such tests using the standard
Test
task's--tests
filterThere 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.
Yes, those would be good benefits. I'm just struggling to think about how to generate tests dynamically though, because I usually find code generation inconvenient and prone to mistakes.
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.
If you decide to look further into the direction of generating test cases, I think the setup is usually something like:
src/MyTestsInfrastructure.kt
src/tests-gen/Tests.kt