gradle task order with imported ant build

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

gradle task order with imported ant build

kiwiwings
Hi Devs,

this is driving me nuts ... -.- ... as noted in Dominiks build, when importing the ant build the helpers need to be compiled before-hand.
But the solution in his script is not working. If I comment out the blocks and let it compile independently it works, but not in one go.

How can I configure the task 'ant-compile-ooxml-xsds' to run after (mustRunAfter) the task 'compileContrib'?

Andi


task compileContrib (type: JavaCompile){ source ="../excelant/src/poi-ant-contrib/java" include'*.java' exclude'Junit5Progress.java' classpath = configurations.antdep
     destinationDirectory = file('../excelant/build/poi-ant-contrib')
} // for now import the ant-task for building the jars from build.xml // we need to rename the tasks as e.g. task "jar" conflicts with :ooxml:jar ant.importBuild('../build.xml'){ antTargetName-> 'ant-' + antTargetName
} getByPath('ant-compile-ooxml-xsds').configure{ dependsOn'compileContrib' } compileJava.dependsOn'ant-compile-ooxml-xsds'

Reply | Threaded
Open this post in threaded view
|

Re: gradle task order with imported ant build

fanningpj@apache.org
Do you see this directive?: compileJava.dependsOn 'ant-compile-ooxml-xsds'

This is controls the order of these 2 tasks.






On Saturday 27 March 2021, 10:54:50 GMT, Andreas Beeker <[hidden email]> wrote:





Hi Devs,

this is driving me nuts ... -.- ... as noted in Dominiks build, when importing the ant build the helpers need to be compiled before-hand.
But the solution in his script is not working. If I comment out the blocks and let it compile independently it works, but not in one go.

How can I configure the task 'ant-compile-ooxml-xsds' to run after (mustRunAfter) the task 'compileContrib'?

Andi


task compileContrib (type: JavaCompile){ source ="../excelant/src/poi-ant-contrib/java" include'*.java' exclude'Junit5Progress.java' classpath = configurations.antdep
    destinationDirectory = file('../excelant/build/poi-ant-contrib')
} // for now import the ant-task for building the jars from build.xml // we need to rename the tasks as e.g. task "jar" conflicts with :ooxml:jar ant.importBuild('../build.xml'){ antTargetName-> 'ant-' + antTargetName
} getByPath('ant-compile-ooxml-xsds').configure{ dependsOn'compileContrib' } compileJava.dependsOn'ant-compile-ooxml-xsds'


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: gradle task order with imported ant build

kiwiwings
I've tried it like this before, but to no avail:

compileJava.dependsOn'compileContrib' compileJava.dependsOn'ant-compile-ooxml-xsds'


or

compileJava.dependsOn'compileContrib','ant-compile-ooxml-xsds'


I'm just fixing the sonar build now and then commit the lot for you guys to fix the gradle build.





On 27.03.21 12:23, [hidden email] wrote:

> Do you see this directive?: compileJava.dependsOn 'ant-compile-ooxml-xsds'
>
> This is controls the order of these 2 tasks.
>
>
>
>
>
>
> On Saturday 27 March 2021, 10:54:50 GMT, Andreas Beeker <[hidden email]> wrote:
>
>
>
>
>
> Hi Devs,
>
> this is driving me nuts ... -.- ... as noted in Dominiks build, when importing the ant build the helpers need to be compiled before-hand.
> But the solution in his script is not working. If I comment out the blocks and let it compile independently it works, but not in one go.
>
> How can I configure the task 'ant-compile-ooxml-xsds' to run after (mustRunAfter) the task 'compileContrib'?
>
> Andi
>
>
> task compileContrib (type: JavaCompile){ source ="../excelant/src/poi-ant-contrib/java" include'*.java' exclude'Junit5Progress.java' classpath = configurations.antdep
>      destinationDirectory = file('../excelant/build/poi-ant-contrib')
> } // for now import the ant-task for building the jars from build.xml // we need to rename the tasks as e.g. task "jar" conflicts with :ooxml:jar ant.importBuild('../build.xml'){ antTargetName-> 'ant-' + antTargetName
> } getByPath('ant-compile-ooxml-xsds').configure{ dependsOn'compileContrib' } compileJava.dependsOn'ant-compile-ooxml-xsds'
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>