-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fix Gradle task annotations #159
Conversation
Hi, It might be OK, to apply Explanation: If classpath changes, the task must re-run, so it MUST be declared as |
Why do you think so, can you please clarify? |
The patterns are not really important on their own. |
This is already handled by existing forbidden-apis/src/main/java/de/thetaphi/forbiddenapis/gradle/CheckForbiddenApis.java Lines 486 to 489 in dd13fcf
|
The reason why it is declared as The "correct" workaround would be to place a fake "output" file that updates its timestamp after every execution and declare this on as output.
I agree with that one, in Gradle's SourceTask it's the same: |
Sorry for that. It's marked with |
No output is fine. In that case, you configure the task with I have a Gradle task here: https://github.com/autostyle/autostyle/blob/3edcb79a2ddd0c8e6a988d5b6d8fd3ee2f9a729a/plugin-gradle/src/main/kotlin/com/github/autostyle/gradle/AutostyleCheckTask.kt It produces no outputs, and it works incrementally. |
Note: For instance, if the user configures |
I am working on a solution for this. There is another issue open. The idea is to just create a text file with all violations found. This one should be declared as I will later merge your PR, excluding the changes for |
The |
:( I recognize it takes time to maintain the library (and I recognize Gradle task is not the only way to apply the check). By the way, |
Hi, In short: The correct fix is to supply some output, which also helps people that suppress any output in Gradle (I prefer to always run it with The support for older Gradle versions also has to do with Java-6-Support. This will go away soon. |
Hi,
How did this compile for you? |
I have not tried to compile it |
Ok, thanks so this needs to wait a bit, until minimum Java version was upgraded (see above). |
This fixes #153