build.gradle 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. buildscript {
  2. repositories {
  3. jcenter()
  4. mavenCentral()
  5. }
  6. dependencies {
  7. classpath 'com.android.tools.build:gradle:1.5.0'
  8. }
  9. }
  10. apply plugin: 'com.android.application'
  11. repositories {
  12. mavenCentral()
  13. }
  14. dependencies {
  15. compile fileTree(include: ['*.jar'], dir: 'libs')
  16. // compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
  17. //compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
  18. //compile 'org.apache.httpcomponents:httpmime:4.3.6'
  19. compile project(':SliderPreference')
  20. }
  21. android {
  22. compileSdkVersion 23
  23. buildToolsVersion '23.0.2'
  24. sourceSets {
  25. main {
  26. manifest.srcFile 'AndroidManifest.xml'
  27. java.srcDirs = ['src']
  28. resources.srcDirs = ['src']
  29. aidl.srcDirs = ['src']
  30. renderscript.srcDirs = ['src']
  31. res.srcDirs = ['res']
  32. assets.srcDirs = ['assets']
  33. }
  34. // Move the tests to tests/java, tests/res, etc...
  35. instrumentTest.setRoot('tests')
  36. // Move the build types to build-types/<type>
  37. // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
  38. // This moves them out of them default location under src/<type>/... which would
  39. // conflict with src/ being used by the main source set.
  40. // Adding new build types or product flavors should be accompanied
  41. // by a similar customization.
  42. debug.setRoot('build-types/debug')
  43. release.setRoot('build-types/release')
  44. packagingOptions {
  45. exclude 'META-INF/NOTICE'
  46. exclude 'META-INF/LICENSE'
  47. }
  48. }
  49. // http://stackoverflow.com/questions/32153318/httpclient-wont-import-in-android-studio
  50. useLibrary 'org.apache.http.legacy'
  51. buildTypes {
  52. release {
  53. zipAlignEnabled true
  54. }
  55. }
  56. }
  57. dependencies {
  58. // compile 'com.google.android.gms:play-services-appindexing:8.1.0'
  59. }