Skip to content
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

Why is release task GradleBuild type? #62

Closed
houbie opened this issue Oct 21, 2013 · 1 comment
Closed

Why is release task GradleBuild type? #62

houbie opened this issue Oct 21, 2013 · 1 comment

Comments

@houbie
Copy link

houbie commented Oct 21, 2013

Hi,

While executing the release task, I noticed 2 things:

  • most dependent tasks are executed twice
  • I set an ext property based on gradle.startParameter.taskNames.contains('release'), but this property gets lost during the release task because it runs in a new context with a new startParameter

So my question: is there a specific reason why the release task has type GradleBuild i.s.o. being a plain task that depends on other tasks?

Ivo

@townsfolk
Copy link
Contributor

Yes. Initially I wanted user's to be able to define the release process and just provide A. a good default, B. helpful tasks that the user can use if they want to define the process completely.

The issue is that the configuration for tasks is done after the tasks and tree is defined, so that's not possible atm.

The other reason is that the "depends" option doesn't guarantee order. It does in the base case here because each task would only depend on a single task, but if the user plugged in their own dependencies those could get executed before the other tasks - since gradle has it's own logic to determine which task should be executed first. Using the GradleBuild type was/is the only way I know of that can absolutely guarantee order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants