public boolean getMayHaveSources() {
   // TODO:DAZ This doesn't take into account build dependencies of the
   // SourceDirectorySet.
   // Should just ditch SourceDirectorySet from here since it's not really
   // a great model, and drags in too much baggage.
   return generated || !source.isEmpty();
 }
Exemplo n.º 2
0
  private File _getSrcDir(SourceDirectorySet sourceDirectorySet) {
    Set<File> srcDirs = sourceDirectorySet.getSrcDirs();

    Iterator<File> iterator = srcDirs.iterator();

    return iterator.next();
  }
 private BaseLanguageSourceSet(SourceSetInfo info) {
   if (info == null) {
     throw new ModelInstantiationException(
         "Direct instantiation of a BaseLanguageSourceSet is not permitted. Use a LanguageTypeBuilder instead.");
   }
   this.name = info.name;
   this.parentName = info.parentName;
   this.typeName = info.typeName;
   this.fullName = info.parentName + StringUtils.capitalize(name);
   this.source = new DefaultSourceDirectorySet("source", info.fileResolver);
   this.fileResolver = info.fileResolver;
   super.builtBy(source.getBuildDependencies());
 }