How do I specify test resources using the Play plugin?

I would like to add a resource directory that contains an application.conf used only for testing. I can configure additional source sets per the documentation, but this will add the resource to the production classpath, which I want to avoid.

Looking at PlayTestPlugin.java, it doesn’t look like there is currently any way to configure test resources.

Another approach I tried was adding a JvmLibrarySpec component and specifying the resources separately, but I’m not sure how to specify the dependencies for the test component. When compiling, I’m confronted with many package does not exist errors. Generally, how can I specify external dependencies for the new rule based model configuration?

Here are relevant portions of my current build.gradle:

plugins {
    id 'play'
    id 'idea'
    id 'jvm-component'
}

def playVersion = '2.4.2'                                                                                       
def scalaVersion = '2.11'                                                                                       
                                                                                                                
model {                                                                                                         
    components {                                                                                                
        play {
            platform play: playVersion, scala: scalaVersion
            injectedRoutesGenerator = true
        }

        test(JvmLibrarySpec) {
            sources {
                java {
                    source.srcDir file('test')

                    dependencies {
                        // library 'play'
                        // ^^ Gives error: Project ':project' does not contain library 'play'. Did you want to use 'test'?
                        // Also, is there a way to specify external dependencies?
                    }
                }
                                                                                                                
                resources {
                    source.srcDir file('test/resources')
                }
            }
        }
    }
}

dependencies {
    play(
            [group: 'com.typesafe.play', name: "play-cache_$scalaVersion", version: playVersion],
            ...
    )

    playTest(
            [group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'],
            [group: 'org.mockito', name: 'mockito-core', version: '2.0.26-beta']
    )
}

I’ve submitted a pull request to include the default test resources directory when running testPlayBinary.