}
getLog().debug( "The module XML hasn't been updated");
// js file already exists, but may not be up-to-date with project source files
SingleTargetSourceMapping singleTargetMapping = new SingleTargetSourceMapping( ".java", outputTarget );
StaleSourceScanner scanner = new StaleSourceScanner();
scanner.addSourceMapping( singleTargetMapping );
SingleTargetSourceMapping uiBinderMapping = new SingleTargetSourceMapping( ".ui.xml", outputTarget );
scanner.addSourceMapping( uiBinderMapping );
Collection<File> compileSourceRoots = new HashSet<File>();
for (String sourceRoot : getProject().getCompileSourceRoots()) {
for (String sourcePackage : gwtModule.getSources()) {
String packagePath = gwtModule.getPackage().replace( '.', File.separatorChar );
File sourceDirectory = new File (sourceRoot + File.separatorChar + packagePath + File.separator + sourcePackage);
if(sourceDirectory.exists()) {
getLog().debug(" Looking in a source directory "+sourceDirectory.getAbsolutePath() + " for possible changes");
compileSourceRoots.add(sourceDirectory);
}
}
}
for ( File sourceRoot : compileSourceRoots )
{
if ( !sourceRoot.isDirectory() )
{
continue;
}
try
{
if ( !scanner.getIncludedSources( sourceRoot, output ).isEmpty() )
{
getLog().debug( "found stale source in " + sourceRoot + " compared with " + output );
return true;
}
}