build.gradle 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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:appcompat-v7:25.3.1"
  15. }
  16. // The sample build uses multiple directories to
  17. // keep boilerplate and common code separate from
  18. // the main sample code.
  19. List<String> dirs = [
  20. 'main', // main sample code; look here for the interesting stuff.
  21. 'common', // components that are reused by multiple samples
  22. 'template'] // boilerplate code that is generated by the sample template process
  23. android {
  24. compileSdkVersion 25
  25. buildToolsVersion "25.0.3"
  26. defaultConfig {
  27. minSdkVersion 23
  28. targetSdkVersion 25
  29. }
  30. compileOptions {
  31. sourceCompatibility JavaVersion.VERSION_1_7
  32. targetCompatibility JavaVersion.VERSION_1_7
  33. }
  34. sourceSets {
  35. main {
  36. dirs.each { dir ->
  37. java.srcDirs "src/${dir}/java"
  38. res.srcDirs "src/${dir}/res"
  39. }
  40. }
  41. androidTest.setRoot('tests')
  42. androidTest.java.srcDirs = ['tests/src']
  43. }
  44. }