Thanks a lot.
Compilation works for the client (I didn't try the jar yet), though I would
like to ask some questions on the why:
> dependencies {
> addConfiguration("client")
> client "some:dep:1.0"
> linkConfWithTask('client', 'webserviceCompile')
> }
>
> createTask('webserviceCompile', type: Compile, dependsOn:
> resources).configure {
> destinationDir = new File(buildDir, 'webservice-classes')
> include 'com/mycompany/webservice/**', '...'
> exclude ... // Possibly needed
> conventionMapping(DefaultConventionsToPropertiesMapping.COMPILE)
> }
>
> jar(appendix: 'webservice') {
> fileSet(dir: new File(buildDir, 'webservice-classes'))
> configurations = ['client']
> }
Why do I have to add a linkConfWithTask in the dependencies? IMHO the
dependencies are independent from the tasks, esp. if in the future they are
read from the ivy.xml.
I think, it would be more logical to have a "configurations = ..." in the
compile task like in the jar task, where the default configuration for the
compile task would of course be 'compile'.
Similarly I think that the conventionMapping should be by default the
'COMPILE' object, if not specified. This would make the gradle script
shorter and not cluttered with irrelevant information.
--
View this message in context:
http://www.nabble.com/Additional-dependency-configuration-and-additional-compile-task-tp19991304p20089050.html
Sent from the gradle-user mailing list archive at Nabble.com.