Hi DDC,

This depends on how you have your project setup. If you mix server and client code together then you would need to filter them by package as Rolf suggested. You can always add source jars by attaching dependencies to a separate configuration. E.g.:

configurations {
  gwt
}

dependencies {
  gwt ( group:'javax.validation', name:'validation-api',
        version:'1.0.0.GA', classifier:'sources' )
}
tasks.addRule('Pattern: <module>Gwt') { taskName ->
  if (taskName.endsWith('Gwt')) {
    task "$taskName" (dependsOn: 'classes', type: JavaExec) {
      inputs.dir sourceSets.main.classesDir
      outputs.dir "$buildDir/gen"
      main = 'com.google.gwt.dev.Compiler'
      classpath {
        [ sourceSets.main.java.srcDirs,
          sourceSets.main.runtimeClasspath,
          configurations.gwt ]
      }
      args 'com.myplace.mypackage.' + (taskName - 'Gwt'),
         '-war', "$buildDir/gen",
         '-localWorkers', '2',
         '-style', 'PRETTY',
         '-draftCompile'
    }
  }
}

Cheers,
Merlyn
On Aug 4, 2011, at 7:11 AM, dcracauer wrote:

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.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply via email to