build.gradle 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. buildscript {
  2. repositories {
  3. jcenter()
  4. }
  5. dependencies {
  6. classpath 'com.android.tools.build:gradle:2.3.2'
  7. }
  8. }
  9. apply plugin: 'com.android.application'
  10. repositories {
  11. jcenter()
  12. }
  13. dependencies {
  14. compile "com.android.support:support-v4:25.3.1"
  15. compile "com.android.support:support-v13:25.3.1"
  16. compile "com.android.support:cardview-v7:25.3.1"
  17. compile "com.android.support:appcompat-v7:25.3.1"
  18. }
  19. // The sample build uses multiple directories to
  20. // keep boilerplate and common code separate from
  21. // the main sample code.
  22. List<String> dirs = [
  23. 'main', // main sample code; look here for the interesting stuff.
  24. 'common', // components that are reused by multiple samples
  25. 'template'] // boilerplate code that is generated by the sample template process
  26. android {
  27. compileSdkVersion 25
  28. buildToolsVersion "25.0.3"
  29. defaultConfig {
  30. minSdkVersion 23
  31. targetSdkVersion 25
  32. }
  33. compileOptions {
  34. sourceCompatibility JavaVersion.VERSION_1_7
  35. targetCompatibility JavaVersion.VERSION_1_7
  36. }
  37. sourceSets {
  38. main {
  39. dirs.each { dir ->
  40. java.srcDirs "src/${dir}/java"
  41. res.srcDirs "src/${dir}/res"
  42. }
  43. }
  44. androidTest.setRoot('tests')
  45. androidTest.java.srcDirs = ['tests/src']
  46. }
  47. }