[GRADLE-363] The build/install of gradle from source should fail immediately if install properties aren't set, not at the very end. Created: 21/Jan/09  Updated: 04/Jan/13  Resolved: 12/Feb/09

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

Type: Bug
Reporter: Jon Cox Assignee: Hans Dockter
Resolution: Fixed Votes: 0


 Description   

Build gradle from source like this (but foolishly neglect to set gradle_installDir):

% gradlew clean install

It would be nicer if the build checked that the necessary install properties
are set up-front. That way it could fail immediately.

Currently, after a somewhat lengthy set of sub-builds & tests completes, the install target chokes with:

Build file .../build.gradle' line: 427

Execution failed for task :install.
Cause: Property 'gradle_installDir' not found for project



 Comments   
Comment by Jon Cox [ 21/Jan/09 ]

The http://www.gradle.org/build.html says that you can set the following
properties within your $HOME/.gradle/gradle.properties file:

gradle_installDir=/some/directory/path/for/your/install
gradle_installDirName=the_leaf_install_dir_name

It might also be nice for http://www.gradle.org/build.html to note that
you can set them within the gradle.properties file at the top level of
the gradle build itself, and mention the $GRADLE_HOME environment
variable in this context too.

Comment by Jon Cox [ 22/Jan/09 ]

Of course, it should also be noted that if you install & reinstall
gradle frequently (as a developer might), you're better off making
the gradle_installDir and gradle_installDirName property settings
within your $HOME/.gradle/gradle.properties file because it
will always be around (unlike perhaps ephemeral working directories
containing gradle's source code).

Comment by Hans Dockter [ 26/Jan/09 ]

I agree.

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