Advertisement
Guest User

Untitled

a guest
Mar 5th, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. dependencies {
  2. compile fileTree(dir: 'libs', include: '*.jar')
  3. compile project(':Cropper')
  4. compile project(':FacebookSDK')
  5. compile project(':android-support-v7-appcompat')
  6. compile project(':google-play-services_lib')
  7. compile 'com.android.support:multidex:1.0.0'
  8.  
  9. }
  10.  
  11. android {
  12. compileSdkVersion 21
  13. buildToolsVersion "21.1.0"
  14.  
  15. defaultConfig {
  16. ...
  17. minSdkVersion 14
  18. targetSdkVersion 21
  19. ...
  20.  
  21. // Enabling multidex support.
  22. multiDexEnabled true
  23. }
  24.  
  25.  
  26.  
  27. sourceSets {
  28. main {
  29. manifest.srcFile 'AndroidManifest.xml'
  30. java.srcDirs = ['src']
  31. resources.srcDirs = ['src']
  32. aidl.srcDirs = ['src']
  33. renderscript.srcDirs = ['src']
  34. res.srcDirs = ['res']
  35. assets.srcDirs = ['assets']
  36. }
  37.  
  38. // Move the tests to tests/java, tests/res, etc...
  39. instrumentTest.setRoot('tests')
  40.  
  41. // Move the build types to build-types/<type>
  42. // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
  43. // This moves them out of them default location under src/<type>/... which would
  44. // conflict with src/ being used by the main source set.
  45. // Adding new build types or product flavors should be accompanied
  46. // by a similar customization.
  47. debug.setRoot('build-types/debug')
  48. release.setRoot('build-types/release')
  49. }
  50.  
  51.  
  52. afterEvaluate {
  53. tasks.matching {
  54. it.name.startsWith('dex')
  55. }.each { dx ->
  56. if (dx.additionalParameters == null) {
  57. dx.additionalParameters = ['--multi-dex']
  58. } else {
  59. dx.additionalParameters += '--multi-dex'0
  60. }
  61. }
  62. }
  63.  
  64. subprojects {
  65. project.plugins.whenPluginAdded { plugin ->
  66. if ("com.android.build.gradle.AppPlugin".equals(plugin.class.name)) {
  67. project.android.dexOptions.preDexLibraries = false
  68. } else if ("com.android.build.gradle.LibraryPlugin".equals(plugin.class.name)) {
  69. project.android.dexOptions.preDexLibraries = false
  70. }
  71. }
  72. }
  73.  
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement