-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fixes Issue 33 - 'RegularFileProperty' annotated with @Input cannot determine how to interpret the file #46
Conversation
…etermine how to interpret the file
import org.gradle.api.tasks.TaskAction | ||
|
||
@CacheableTask | ||
public abstract class ClearFocusTask : DefaultTask() { | ||
|
||
@get:Input | ||
@get:PathSensitive(PathSensitivity.RELATIVE) | ||
@get:InputFile |
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.
Addresses:
* What went wrong:
A problem was found with the configuration of task ':clearFocus' (type 'ClearFocusTask').
- Type 'com.dropbox.focus.ClearFocusTask' property 'focusFile' has @Input annotation used on property of type 'RegularFileProperty'.
Reason: A property of type 'RegularFileProperty' annotated with @Input cannot determine how to interpret the file.
Possible solutions:
1. Annotate with @InputFile for regular files.
2. Annotate with @InputFiles for collections of files.
3. If you want to track the path, return File.absolutePath as a String and keep @Input.
For more information, please refer to https://docs.gradle.org/8.5/userguide/validation_problems.html#incorrect_use_of_input_annotation in the Gradle documentation.
import org.gradle.api.tasks.TaskAction | ||
|
||
@CacheableTask | ||
public abstract class ClearFocusTask : DefaultTask() { | ||
|
||
@get:Input | ||
@get:PathSensitive(PathSensitivity.RELATIVE) |
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.
Addresses:
* What went wrong:
Some problems were found with the configuration of task ':clearFocus' (type 'ClearFocusTask').
- Type 'com.dropbox.focus.ClearFocusTask' property 'focusFile' is annotated with @InputFile but missing a normalization strategy.
Reason: If you don't declare the normalization, outputs can't be re-used between machines or locations on the same machine, therefore caching efficiency drops significantly.
Possible solution: Declare the normalization strategy by annotating the property with either @PathSensitive, @Classpath or @CompileClasspath.
For more information, please refer to https://docs.gradle.org/8.5/userguide/validation_problems.html#missing_normalization_annotation in the Gradle documentation.
This is already addressed here: #42 |
@ivanalvarado Hi!, why have you closed the PR? the project seems to be abandoned? |
Sorry, this got closed. I'm going to reopen it and pull this in, as it's a good fix and the other PR has been in draft, which is why it hasn't been reviewed. |
Sorry that's my fault for not explainig why #42 was stuck in draft and asking for help with the issue I was running into. I ended up running into this since the The test that was failing in my branch is now failing in main after merging this in |
Sorry @WhosNickDoglio, I appreciate your contribution. I noticed the same issue you pointed out after merging, and have that fixed now. There's a new release which has this taken care of. Thanks to both of you for contributing to the project. |
Description
Build Stack
8.1.1
1.9.20
8.5
0.5.1