I’m having some trouble getting gradle to do exactly what I want and I’d love some help… I’m trying to build a multi-project java project. The UI layer uses vaadin, so I added:
apply from: ‘http://plugins.jasoft.fi/vaadin.plugin’
to that project’s build.gradle. I’m also following the pattern of chapter 7 and putting hte apply plugin:java in a subprojects {} in the top level build file.
This leaves me with 2 problems:
- The first time (after clean) I run gradle build, the vaadin project fails because it can’t find the vaadin libraries, but re-running gradle build works. 2) The vaadin plugin seems to build a war file automatically but for some reason doesn’t include its static resources in the jar.
Second problem: Where do dependent jars get put after the build? For example, in another subproject (that the vaadin project depends on) I have:
dependencies {
compile ‘net.sf.opencsv:opencsv:2.3’ }
And it does compile even on its own, but when I make a jar of it the opencsv file is nowhere to be found. However both the project jar and opencsv jar are included in the war file generated by the vaadin plugin, so that’s good.
I suspect there’s probably a way to tell the vaadin project what extra stuff to include in the war file… How do I do that?
And if I were working on a project that doesn’t produce a war, where do I find the dependent jars?
Oh also, what’s the correct way to indicate multiple dependencies on a task? When the manual uses the task X(dependsOn: ‘:y:z’) format it only ever shows an example with 1. How would I add another? Do I just use dependencies { } instead? What’s the difference?
Thanks. That should get me started, I think.