Friday, 11 September 2015




This is a demo app for android that shows how to create nested resource directories using the gradle build system.
The trick to nesting resource folders is to use gradle's ability to merge multiple resource folders, and set the res folder as well as the nested subfolders in the sourceSets block.
The quirk is that you can't declare a container resource folder before you declare that folder's child resource folders.
Below is the sourceSets block from the build.gradle file. Notice that the subfolders are declared first.
sourceSets {
    main {
        res.srcDirs = [

No comments:

Post a Comment