Strange problem when specifying sourceSets

In a multi project I specify the following sourceSets for one of my subprojects:

sourceSets {
 main {
  java {
   srcDir 'src'
   srcDir 'scr_ws_gen'
  }
  resources {
   srcDir 'resources'
  }
 }
}

When I build the project the compilation fails. The reason is that classes located in ‘src_ws_gen’ cannot be seen (… cannot find symbol …). I also noticed that the folder build\classes\main is empty.

If I simply rename the ‘src_ws_gen’ folder to ‘src_other_gen’ and update the sourceSet:

sourceSets {
 main {
  java {
   srcDir 'src'
   srcDir 'src_other_gen'
  }
  resources {
   srcDir 'resources'
  }
 }
}

it works fine. Are there restrictions on valid sourceSet names?

There are no restrictions. Looks like you misspelled ‘src’ as ‘scr’.