Is it possible to distinguish between application sourceSets/resources and test?

When specifying sourceSets is it possible to distinguish between application source and test source?

The same question with resources (I could not find an example anywhere).

The reason I ask is that I assume one goal of gradle (as was with Maven) is to model the project so that an IDE can read the build file and build the IDE project (files) such that we do not have to check in IDE files (multi IDE shop, we have everything).

Sure. As indicated in the documentation:

The Java plugin defines two standard source sets, called main and test. The main source set contains your production source code, which is compiled and assembled into a JAR file. The test source set contains your unit test source code, which is compiled and executed using JUnit or TestNG.

Each SourceSet has a ‘java’ property, and a 'resources’property. See http://www.gradle.org/docs/current/dsl/org.gradle.api.tasks.SourceSet.html.

The structure of the project is the same as the one used by Maven:

src

main

java

resources

test

java

resources