In project B's bruild.gradle:
configurations {
preProcCP
}
dependencies {
preProcCP "log4j:log4j:1.2.18"
}
task preProc << {
ant.java(classname: 'com.my.classname', fork: true,
classpath: "${sourceSets.main.preProcCP.asPath}")
}
compile.dependsOn preproc
Be sure to look at the Dependency Management section (ch 32) of the User
Guide for much more on dependency configurations.
On Fri, Jun 11, 2010 at 4: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.
>
> 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?
>
> Cheers,
> Matthias
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>