Skip to content

The 'clean' task is already present#55

Merged
maestromac merged 1 commit intoforem:masterfrom
sierisimo:removing_redundant_task
Oct 21, 2019
Merged

The 'clean' task is already present#55
maestromac merged 1 commit intoforem:masterfrom
sierisimo:removing_redundant_task

Conversation

@sierisimo
Copy link
Contributor

@sierisimo sierisimo commented Oct 14, 2019

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Documentation Update

Description

The new added custom task ':clean' is redundant as the project itself has a configuration already set for cleaning the project.

The new task only adds the posibility of being called with './gradlew :clean' instead of './gradlew clean' issue with this custom task is that it only clears the 'rootProject.buildDir' but currently the project has four build directories:

  • app/build
  • buildSrc/build
  • data/build
  • baseui/build

These directories should be cleaned on every call of the clean task and adding a new task for it seems redundant.

Other possible option is to add the cleanup by hand:

task("clean") {
     …
     delete(allprojects.map { it.buildDir }.toTypedArray())
}

But gradle does something similar to this. No actual need to process anything…

Related Tickets & Documents

[optional] What gif best describes this PR or how it makes you feel?

@CLAassistant
Copy link

CLAassistant commented Oct 14, 2019

CLA assistant check
All committers have signed the CLA.

The new added custom task ':clean'  is redundant as the project itself has a configuration already set for cleaning the project.

The new task only adds the posibility of being called with './gradlew :clean' instead of './gradlew clean' issue with this custom task is that it only clears the 'rootProject.buildDir' but currently the project has four build directories:

* app/build
* buildSrc/build
* data/build
* baseui/build

These directories should be cleaned on every call of the clean task and adding a new task for it seems redundant
@sierisimo sierisimo force-pushed the removing_redundant_task branch from 45b335d to 3c39e04 Compare October 14, 2019 07:53
Copy link
Contributor

@maestromac maestromac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @sierisimo !

@maestromac maestromac merged commit 9372d0c into forem:master Oct 21, 2019
@sierisimo sierisimo deleted the removing_redundant_task branch October 22, 2019 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants