On 13/12/09 4:50 AM, tinca wrote:
Hello,

The custom ant task to be used is this:
http://www.kiv.zcu.cz/~ledvina/Cviceni-DS-2006/tyden_08/starterkit-examples/tools/ant-addons/classdepandjar/docs/api/org/jini/project/example/jade/tools/ClassDepAndJarTask.html
(Note that the task's qualified name has changed as it is now part of the
Rio project.)

Tha gradle task is:

task classdep<<  {
   ant.taskdef(
       name: "classdepandjar",
       classname: "org.jini.rio.tools.ant.ClassDepAndJarTask",
       // TODO: path separator
       classpath: configurations.compile.asPath + ':' +
compileJava.destinationDir)

   ant.classdepandjar(
       topclass: 'my.domain.topclass',
       jarfile: 'sample.jar',
       files: 'true',
       classpath: configurations.compile.asPath + ':' +
compileJava.destinationDir
       //in: 'my.domain'
   )
}

This is syntactically correct, however the last attribute "in" is not
accepted.

In Groovy, you can quote a keyword to use it as a map key like this. So, you could do:

ant.classdepandjar(
    ....
    'in': 'my.domain'
)

  Running the task gives:

* What went wrong:
Could not compile build file '/usr/home/kuti/project/PSMC/build.gradle'.
Cause: startup failed, build_gradle_c83c33492c552dc874c2e8e7a153b85c: 102:
expecting ')',
found 'in' @ line 102, column 7.
1 error

Without that line the task produces sample.jar.

The groovy refcard contains constructs that uses "in" so it must be a
keyword. If this is true, how
can I solve this problem?

Thanks
Zsolt

--
Adam Murdoch
Gradle Developer
http://www.gradle.org


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to