build.gradle 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. buildscript {
  2. repositories {
  3. mavenCentral()
  4. }
  5. dependencies {
  6. classpath 'com.android.tools.build:gradle:0.12.+'
  7. }
  8. }
  9. apply plugin: 'android'
  10. dependencies {
  11. compile fileTree(dir: 'libs', include: '*.jar')
  12. }
  13. android {
  14. compileSdkVersion 21
  15. buildToolsVersion "20.0.0"
  16. compileOptions {
  17. sourceCompatibility JavaVersion.VERSION_1_7
  18. targetCompatibility JavaVersion.VERSION_1_7
  19. }
  20. sourceSets {
  21. main {
  22. manifest.srcFile 'AndroidManifest.xml'
  23. java.srcDirs = ['src']
  24. resources.srcDirs = ['src']
  25. aidl.srcDirs = ['src']
  26. renderscript.srcDirs = ['src']
  27. res.srcDirs = ['res']
  28. assets.srcDirs = ['assets']
  29. }
  30. // Move the tests to tests/java, tests/res, etc...
  31. instrumentTest.setRoot('tests')
  32. // Move the build types to build-types/<type>
  33. // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
  34. // This moves them out of them default location under src/<type>/... which would
  35. // conflict with src/ being used by the main source set.
  36. // Adding new build types or product flavors should be accompanied
  37. // by a similar customization.
  38. debug.setRoot('build-types/debug')
  39. release.setRoot('build-types/release')
  40. }
  41. }