dcracauer <dcracauer@...> writes:
>
> Hi,
> To support our gwt development, we need to get the source jar for one of our
> dependencies on to the classpath (in addition to the binary jar). Is there
> an easy way to do this?
>
> Thanks
> DDC
>
> --
> View this message in context: http://gradle.1045684.n5.nabble.com/Source-jar-
on-classpath-for-GWT-tp4666458p4666458.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
>
Hello,
To package all (java) sources in a jar you could add the following task to your
project(s):
task packageSources(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
}
Note that for our GWT project, we usually only wanted a subset of a
subproject's
sources, because the GWT compiler will also want the sources for all referenced
types in the source files. You don't want to end up needing for example
spring's
sources on the GWT compile path ;)
For simplicty, we added them to the produced jar of the relevant subproject:
jar {
from sourceSets.main.allJava.matching {
include 'package/to/relevant/sources/**'
}
}
Including a subset of source files to the project's jar may not be the most
elegant thing to do, but again, we found out that including all project sources
was too much for us.
Greets Rolf
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email