On 28/02/2011, at 7:23 PM, Juergen Donnerstag wrote: > Hi, > > I'm trying to migrate an existing (maven) app to gradle and it's my > first experience with it. It's probably an easy question (sorry > for that). > > We have *.txt files next to our sources (*.java) and we need these > *.txt files in our output folder (next to *.classes). Not only in the > jar. And that is because we need the txt files for junit tests as > well. By default gradle doesn't seem to copy these files. Any hint or > example how to achieve it?
You can add the java source directory as a resource directory: sourceSets.main.resources.srcDir 'src/main/java' // or whatever the source dir happens to be The processResources task will then copy anything which is not a .java file across to the classes directory. -- Adam Murdoch Gradle Developer http://www.gradle.org CTO, Gradleware Inc. - Gradle Training, Support, Consulting http://www.gradleware.com
