[GRADLE-1480] org.gradle.api.tasks.bundling.Jar#getVersion() returns wrong value Created: 17/Apr/11 Updated: 04/Jan/13 Resolved: 19/Apr/11 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 1.0-milestone-2 |
Fix Version/s: | None |
Type: | Bug | ||
Reporter: | Marco Hunsicker | Assignee: | Peter Niederwieser |
Resolution: | Not A Bug | Votes: | 0 |
Attachments: | gradle-issue.zip |
Description |
While trying to create a fatjar out of certain project jars, I've been running into a minor problem: If a subproject defines a version that is different from the default version specified within the main build.gradle, the project specific version is not accessible from the bundling task. Maybe it's just me misunderstanding or misusing the API. Here's the basic code that creates the fat jar in the root project (the whole project data is attached): allprojects { // define default version used by most subprojects version = '1.0' ... }jar { } "archiveTask.archivePath" yields the root project default version! To reproduce, unzip the attached project, change into directory "gradle-issue" and execute $ gradle jar It shows here: FAILURE: Build failed with an exception.
It's not a major problem for me, as there are workarounds, but I'd thought I better let you know. If this is not a bug, I would appreciate any explanation you can provide. Thank you. |
Comments |
Comment by Marco Hunsicker [ 17/Apr/11 ] |
Looks like I did not understand the way Gradle performs project evaluation. This issue can be CLOSED |