Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dependencies {
- compile fileTree(dir: 'libs', include: '*.jar')
- compile project(':Cropper')
- compile project(':FacebookSDK')
- compile project(':android-support-v7-appcompat')
- compile project(':google-play-services_lib')
- compile 'com.android.support:multidex:1.0.0'
- }
- android {
- compileSdkVersion 21
- buildToolsVersion "21.1.0"
- defaultConfig {
- ...
- minSdkVersion 14
- targetSdkVersion 21
- ...
- // Enabling multidex support.
- multiDexEnabled true
- }
- sourceSets {
- main {
- manifest.srcFile 'AndroidManifest.xml'
- java.srcDirs = ['src']
- resources.srcDirs = ['src']
- aidl.srcDirs = ['src']
- renderscript.srcDirs = ['src']
- res.srcDirs = ['res']
- assets.srcDirs = ['assets']
- }
- // Move the tests to tests/java, tests/res, etc...
- instrumentTest.setRoot('tests')
- // Move the build types to build-types/<type>
- // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
- // This moves them out of them default location under src/<type>/... which would
- // conflict with src/ being used by the main source set.
- // Adding new build types or product flavors should be accompanied
- // by a similar customization.
- debug.setRoot('build-types/debug')
- release.setRoot('build-types/release')
- }
- afterEvaluate {
- tasks.matching {
- it.name.startsWith('dex')
- }.each { dx ->
- if (dx.additionalParameters == null) {
- dx.additionalParameters = ['--multi-dex']
- } else {
- dx.additionalParameters += '--multi-dex'0
- }
- }
- }
- subprojects {
- project.plugins.whenPluginAdded { plugin ->
- if ("com.android.build.gradle.AppPlugin".equals(plugin.class.name)) {
- project.android.dexOptions.preDexLibraries = false
- } else if ("com.android.build.gradle.LibraryPlugin".equals(plugin.class.name)) {
- project.android.dexOptions.preDexLibraries = false
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement