I am trying to convert our antiquated Ant build to Gradle. The project contains about Java 50 sub-projects and 10 Scala sub-projects. The Java projects only contain Java and t
How about something like this:
configure(subprojects.findAll {project ->
file('src/main/java').exists()
}) {
apply plugin: 'java'
}
configure(subprojects.findAll {project ->
file('src/main/scala').exists()
}) {
apply plugin: 'scala'
}
Because your source directory is src
, some other discriminator mechanism inside the closures is needed.