You can add three modules to the same project by creating the settings.gradle file in the MyProject / folder and adding modules to it:
include ':MyGradleModule' include ':MyPreGradleModule' include ':MyRawModule'
Then, for each module, configure build.gradle dependencies to reference other modules as needed. For example, add this to MyProjectMainModule so that it uses the output generated by MyGradleModule:
dependencies { compile project(':MyGradleModule') }
Finally, if your project has heterogeneous submodules, you can customize their structure using the 'sourceSets' closure. For example, your raw module will have a configuration similar to this:
android { sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } androidTest.setRoot('tests') } }
Check out this section of the plugin's Gradle manual to see what configuration options are available.
Mike laren
source share