fix generateRulesDocumentation task to pick up dependencies in serviceloader#66
Merged
emilyyuan03 merged 2 commits intomainfrom Mar 10, 2026
Merged
fix generateRulesDocumentation task to pick up dependencies in serviceloader#66emilyyuan03 merged 2 commits intomainfrom
emilyyuan03 merged 2 commits intomainfrom
Conversation
emilyyuan03
commented
Mar 9, 2026
| // .stream() | ||
| // .map { it.type().name } | ||
| // .toList() | ||
| // .toSet() |
Contributor
Author
There was a problem hiding this comment.
Here I am trying to get a set of the class names only in the archRules src set. I can either use this classLoader approach or read from the META-INF file like below... wondering which approach is better? I assume the META-INF since it doesn't require another classloader
wakingrufus
reviewed
Mar 9, 2026
Member
wakingrufus
left a comment
There was a problem hiding this comment.
Ok this makes sense. Good find. Just one minor suggestion.
Thanks!
| abstract val rulesClasspath: ConfigurableFileCollection | ||
|
|
||
| @get:Classpath | ||
| abstract val dependencyClasspath: ConfigurableFileCollection |
Member
There was a problem hiding this comment.
I think 'from()' is additive, so you could just keep 1 classpath property, and call from twice in it in the plugin code
b2cd3d6 to
500b05d
Compare
500b05d to
f431294
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
the ServiceLoader was only picking up classes in the archRules source set, so if those rules depended on an external package (like in OSS archrules, they depend on some predicate helpers in the common library), service loader would fail to read those archrules