Discussion:
Nested version(...) call in ant closure doesn't work
Alexander Kitaev
2012-05-11 18:05:08 UTC
Permalink
Hello,

We have the following build.gradle file:

task a {
} << {
ant.taskdef(...)
ant.deb(todir: ...) {
version(upstream: '1.0.0', debian: 'squeeze')
...
}
}

task b {
} << {
def fileName = "program-${version}.zip"
...
}

The order of tasks is 'a,b'.
There are two problems:

1. ant.deb(...) doesn't take nested 'version' tag into account and uses
'null' for version value instead.
2. as soon as task 'a' is completed, global project 'version' property is
set to Map [upstream: '1.0.0', debian: 'squeeze']

As a result whole build fails. It used to work with Gradle m3.

Is there a way to use ant 'deb' task (custom task) with a nested tag named
'version'?

Thanks!

--
View this message in context: http://gradle.1045684.n5.nabble.com/Nested-version-call-in-ant-closure-doesn-t-work-tp5703720.html
Sent from the gradle-user mailing list archive at Nabble.com.
Peter Niederwieser
2012-05-11 18:34:36 UTC
Permalink
Your post didn't get through to the mailing list. Please use
http://forums.gradle.org instead.

--
Peter Niederwieser
Principal Engineer, Gradleware
http://gradleware.com
Creator, Spock Framework
http://spockframework.org
Twitter: @pniederw

--
View this message in context: http://gradle.1045684.n5.nabble.com/Nested-version-call-in-ant-closure-doesn-t-work-tp5703720p5703806.html
Sent from the gradle-user mailing list archive at Nabble.com.

Loading...