-
Notifications
You must be signed in to change notification settings - Fork 3
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 missing input for CopyJsp
and missing onlyIf
config for WriteDependenciesFile
#213
Conversation
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.
One question
task.externalDependencies.set(project.extensions.findByType(ModuleExtension.class).getExternalDependencies()) | ||
task.onlyIf { | ||
return !task.externalDependencies.get().isEmpty() | ||
} | ||
} catch (UnknownDomainObjectException ignore) { | ||
|
||
} |
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.
Would an UnknownDomainObjectException
cause this task to run when it shouldn't since task.onlyIf {...}
won't be reached?
Should the onlyIf
just be baked into WriteDependenciesFile
, similar to InstallRPackage
?
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.
Technically, that's two questions. 😄, but they are both good questions, so I'll let it slide.
Effectively, it won't happen anymore that the exception is thrown since the configuration is created more broadly, but still a good idea to check. I had assumed Gradle wouldn't like the onlyIf
inside the class, but that's cleaner, so I'll try it.
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.
There is no escape from off-by-one errors 😰
Rationale
The previous PR failed to configure the
CopyJsp
task properly so changes to individualJsp
files were not being picked up (not sure this change to requiring the use of FileSystem injection is altogether a good thing...).The previous PR also failed to prevent the
WriteDependenciesFile
task from running when a module, such as a file-based module, has no dependencies to write about.Related Pull Requests
Changes
InputDirectory
forCopyJsp
taskonlyIf
config forWriteDependenciesFile
task