-
Notifications
You must be signed in to change notification settings - Fork 13
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
Expose addSourcePaths function for directory dependencies #30
Expose addSourcePaths function for directory dependencies #30
Conversation
Superseded by #31, which handles this in a less manual way. Technically less flexible, but I can't think of any use cases for adding a source path that isn't on the compile classpath. |
Actually, reopening since this would currently be the only way to add a directory that isn't named "java"/"kotlin". That restriction is a bit unexpected. |
Looks good, just needs a formatting fix and |
This adds
fun addSourcePaths(sourcePaths: Any)
to the plugin's extension. It can be used when including source directories for generated code, which often come asFileCollection
s with task dependencies. Using aConfigurableFileCollection
as a task input lets us automatically run those dependency tasks when applicable.A practical example is including a
KotlinSourceSet
's source directories in the signature file:This will ensure even generated code properly gets seen by Metalava.