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
Improve API documentation for PathSensitivity and PathSensitive #6983
Improve API documentation for PathSensitivity and PathSensitive #6983
Conversation
This relocates some of the API documentation for PathSensitivity and PathSensitive which today can only be found in the Gradle Guides into the java docs for these types. Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@plexxi.com>
@wolfs Anything more you need from me? |
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.
Thank you for the PR improving our docs! I added some comments.
@@ -28,6 +28,8 @@ | |||
* <p>This annotation should be attached to the getter method in Java or the property in Groovy. | |||
* Annotations on setters or just the field in Java are ignored.</p> | |||
* | |||
* <p>If a {@link CacheableTask} declares a file property without this annotation, the default is {@link PathSensitivity#ABSOLUTE}.</p> |
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.
The default is ABSOLUTE
for all tasks, not only for CacheableTask
s.
@@ -26,6 +26,8 @@ | |||
public enum PathSensitivity { | |||
/** | |||
* Consider the full path of files and directories. | |||
* | |||
* <p><b>This will prevent the task's outputs from being shared across different users via a shared cache.</b></p> |
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.
across different workspaces via the build cache
would be better I think.
@@ -39,6 +39,10 @@ public void visitPropertyValue(PropertyValue propertyValue, PropertyVisitor visi | |||
PathSensitive pathSensitive = propertyValue.getAnnotation(PathSensitive.class); | |||
final PathSensitivity pathSensitivity; | |||
if (pathSensitive == null) { | |||
/* |
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.
Let's not use multi-line comments within code. Please use //
.
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@plexxi.com>
This adds some of the API documentation for PathSensitivity and PathSensitive which today can only be found in the Gradle Guides into the java docs for these types.
This adds some of the API documentation for PathSensitivity and PathSensitive which today can only be found in the Gradle Guides into the java docs for these types.
This relocates some of the API documentation for PathSensitivity and PathSensitive
which today can only be found in the Gradle Guides into the java docs for these
types.
Context
I dug this information out because of a question someone had in this issue here: detekt/detekt#1178 (comment)
I found the information hard to find and required digging through the various guides to find.
I figured it should also be part of the javadocs.
This documentation comes partially from this comment on the release notes for 4.0.1:
Other parts of the documentation came from this part of the guide: https://guides.gradle.org/using-build-cache/#relocatability
Contributor Checklist
<subproject>/src/integTest
) to verify changes from a user perspective<subproject>/src/test
) to verify logic./gradlew <changed-subproject>:check
Gradle Core Team Checklist