build.gradle 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. buildscript {
  2. repositories {
  3. mavenCentral()
  4. }
  5. dependencies {
  6. classpath 'com.android.tools.build:gradle:1.5.0'
  7. }
  8. }
  9. apply plugin: 'com.android.application'
  10. repositories {
  11. mavenCentral()
  12. flatDir {
  13. dirs 'libs'
  14. }
  15. }
  16. dependencies {
  17. compile name: 'touch-image-view'
  18. compile project(':owncloud-android-library')
  19. compile 'com.android.support:support-v4:23.1.1'
  20. compile 'com.android.support:design:23.1.1'
  21. compile 'com.jakewharton:disklrucache:2.0.2'
  22. compile 'com.android.support:appcompat-v7:23.1.1'
  23. }
  24. android {
  25. compileSdkVersion 23
  26. buildToolsVersion "23.0.2"
  27. // as long as ownCloud uses Apache HTTP
  28. // http://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client
  29. useLibrary 'org.apache.http.legacy'
  30. sourceSets {
  31. main {
  32. manifest.srcFile 'AndroidManifest.xml'
  33. java.srcDirs = ['src']
  34. resources.srcDirs = ['src']
  35. aidl.srcDirs = ['src']
  36. renderscript.srcDirs = ['src']
  37. res.srcDirs = ['res']
  38. assets.srcDirs = ['res']
  39. }
  40. // Move the tests to tests/java, tests/res, etc...
  41. instrumentTest.setRoot('tests')
  42. // Move the build types to build-types/<type>
  43. // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
  44. // This moves them out of them default location under src/<type>/... which would
  45. // conflict with src/ being used by the main source set.
  46. // Adding new build types or product flavors should be accompanied
  47. // by a similar customization.
  48. debug.setRoot('build-types/debug')
  49. release.setRoot('build-types/release')
  50. }
  51. compileOptions {
  52. sourceCompatibility JavaVersion.VERSION_1_7
  53. targetCompatibility JavaVersion.VERSION_1_7
  54. }
  55. lintOptions {
  56. abortOnError false
  57. }
  58. packagingOptions {
  59. exclude 'META-INF/LICENSE.txt'
  60. }
  61. }