[GRADLE-220] Provide control to the user if and how project dependencies should be rebuild Created: 12/Sep/08  Updated: 04/Jan/13  Resolved: 06/May/09

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

Type: New Feature
Reporter: Hans Dockter Assignee: Hans Dockter
Resolution: Fixed Votes: 1

Comment by Jon Cox [ 23/Jan/09 ]

What additional control were you thinking of beyond skip?

Comment by Hans Dockter [ 26/Jan/09 ]

For resolving a project dependency you need to build the archives of the project you depend on. Those archives should only depend on tasks that are actually required for building them (e.g. compile). We then want to provide a command line option where you can say:

gradle compile will build the dependsOn project archives without testing

gradle compile -P test will build the dependsOn project archives with testing

something like gradle compile -P -no-build won't build the dependsOn project archives (and assume that they are in the cache from the last build).

Comment by Steve Appling [ 27/Mar/09 ]

How about an extension to the task path syntax to handle this instead of more command line options.

Something like appending a '!' character to a project or task name to mean - just do this one without dependencies.

For example - in a two project system (consumer, provider subprojects), consumer depends on provider:

gradle :consumer:test
This will run full lifecycle (init-libs) on provider before init-test of consumer

gradle :consumer!:test
This would only run init-test tasks on consumer project (ignoring all task dependencies on other projects)

gradle :consumer!:test!
This would run only the test task only on the consumer project (ignoring all task dependencies) .

gradle test!
This would run only the test task in all projects.

In a large build system this can be very handy when you are trying to repeatedly run a task in a single module and know that the archives for the dependencies have already been built.

Comment by Hans Dockter [ 06/May/09 ]

I have copied Steve's proposal to http://jira.codehaus.org/browse/GRADLE-467

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