Gradle setting sourceSet in child

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Gradle setting sourceSet in child

IowA
This post has NOT been accepted by the mailing list yet.


I am new to Gradle and my task is move big project from Maven to Gradle. And there is a problem I need to set sourceSet in wicket module becouse HTML files is next to java files. If I set it in wicket module build.gradle when building it is looking for html files in resources directory, if I set it in parent build.gradle file it works but other pats fails. So I would like to ask if I am setting it wrong or something else.

    sourceSets {
    main {
        resources {
            srcDir 'src/main/java'
            srcDir 'src/main/resources'
            srcDir 'src/main/groovy'
        }
    }
    test {
        resources {
            srcDir 'src/main/java'
            srcDir 'src/main/resources'
            srcDir 'src/test/java'
            srcDir 'src/main/groovy'
        }
    }
}