On Fri, Jun 11, 2010 at 10:28 AM, Matthias Bohlen <[email protected]>wrote:

> Hello,
>
> I'd like to run a code generator program that is built by Gradle inside a
> subproject A of a multi-project build. The code generator should run to
> generate code for another subproject B of the same multi-project build.
>

There are a couple of options. Is the code of the generator project only be
used as part of that multi-project build. Is the generator project only be
used for generating code as part of the build?


>
> How do I run the generator with its own defined classpath that is different
> from the compile classpath of the subproject B for which the generator
> generates the code? And: How do I make the code generator run a precondition
> for the compile task of the subproject B?


For running a JavaProgram from Gradle you can also do:

task gen(type: JavaExec) {
       classpath = configurations.hsqldb // no as path necessary
       main = "org.hsqldb.util.DatabaseManagerSwing"
}

- Hans

--
Hans Dockter
Founder, Gradle
http://www.gradle.org, http://twitter.com/gradleorg
CEO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz



>
> Cheers,
> Matthias
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

Reply via email to