Created
May 21, 2013 21:35
-
-
Save elek/5623441 to your computer and use it in GitHub Desktop.
Workaround for idea module generation with google android plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
project.ideaModule { | |
module.conventionMapping.sourceDirs = { project.sourceSets.main.allSource.srcDirs as LinkedHashSet } | |
module.conventionMapping.testSourceDirs = { project.sourceSets.test.allSource.srcDirs as LinkedHashSet } | |
def configurations = project.configurations | |
module.scopes = [ | |
PROVIDED: [plus: [], minus: []], | |
COMPILE: [plus: [configurations.compile], minus: []], | |
RUNTIME: [plus: [], minus: []], | |
TEST: [plus: [configurations.testCompile], minus: []] | |
] | |
module.conventionMapping.singleEntryLibraries = { | |
[ | |
RUNTIME: project.sourceSets.main.output.dirs, | |
TEST: project.sourceSets.test.output.dirs | |
] | |
} | |
dependsOn { | |
project.sourceSets.main.output.dirs + project.sourceSets.test.output.dirs | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment