[GRADLE-1370] project-report plugin has problems with the clean<TaskName> pattern Created: 04/Feb/11  Updated: 16/Jan/17  Resolved: 16/Jan/17

Status: Resolved
Project: Gradle
Affects Version/s: 0.9.2
Fix Version/s: None

Type: Bug
Reporter: Mathias Kalb Assignee: Unassigned
Resolution: Won't Fix Votes: 0


1. Only 'project-report'

apply plugin: 'project-report'

"gradle tasks" -> No pattern rules
"gradle projectReport" -> report files created
"gradle cleanProjectReport" -> Error 'Task not found'

2. With 'java' plugin

apply plugin: 'project-report'
apply plugin: 'java'

"gradle tasks" -> Show pattern rules
"gradle projectReport" -> report files created
"gradle cleanProjectReport" -> ":cleanProjectReport UP-TO-DATE" No files are deleted.


Comment by Hans Dockter [ 05/Feb/11 ]

The clean rule is contributed by the BasePlugin (which is extended by the JavaBasePlugin, which is extended by the JavaPlugin).

I think we might make the report plugin dependent on the BasePlugin to fix that issue.

Comment by Mathias Kalb [ 06/Feb/11 ]

I think this is a general problem of the clean<TaskName> pattern rule.

If the clean rule is added by the BasePlugin, you can call clean<TaskName> for every task. But it only works for some tasks.

In my opinion there are the follwing two solutions.

1. Integrate the clean pattern rule to gradle core -> You can use it without any plugin (java, ...).
Enhance the clean pattern rule, so it can work with every task (own, gradle plugins, external plugins).
I am not sure if this is possible.

2. The current behavior, but you can use the clean task pattern only for the tasks which are added by the plugins (compileJava, jar, ...).
If you call cleanProjectReport or cleanMyTask you get an error messages.

Comment by Mathias Kalb [ 07/Feb/11 ]

I think this bug is not so urgent. But it should be resolved till "1.0".

Maybe it can be resolved together with these other bugs.

Comment by Mathias Kalb [ 01/Mar/13 ]

It still does not work with the version 1.4.

Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Mathias Kalb [ 03/Dec/16 ]

It still does not work with the version 3.2.1.

Comment by Benjamin Muschko [ 16/Jan/17 ]

The clean task rule is added by the base plugin and needs to be applied to the project in order to leverage the functionality. External plugins add this functionality by plugin aggregation. You apply the base plugin from the code of the external plugin. Please open an issue on GitHub if you still think there's some issue with the functionality. Make sure to provide an concrete example of a task that works properly and one that does not work properly from your perspective.

Generated at Wed Jun 30 11:53:50 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.