build.gradle 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. buildscript {
  2. repositories {
  3. mavenCentral()
  4. }
  5. dependencies {
  6. classpath 'com.android.tools.build:gradle:0.10.1'
  7. }
  8. }
  9. apply plugin: 'android'
  10. repositories {
  11. mavenCentral()
  12. maven {
  13. url 'https://oss.sonatype.org/content/groups/public'
  14. }
  15. }
  16. dependencies {
  17. compile 'com.google.android.gms:play-services:4.+'
  18. compile 'org.roboguice:roboguice:2.0'
  19. compile files('libs/nineoldandroids-2.4.0.jar')
  20. compile 'com.android.support:support-v4:18.0.0'
  21. //compile fileTree(dir: 'libs', include: '*.jar')
  22. compile files('libs/swipelistview-1.0.jar')
  23. compile files('libs/sshlib-v1.1.jar')
  24. compile files('libs/chart-library2.2.jar')
  25. }
  26. android {
  27. compileSdkVersion 19
  28. buildToolsVersion "19.0.3"
  29. sourceSets {
  30. main {
  31. manifest.srcFile 'AndroidManifest.xml'
  32. java.srcDirs = ['src']
  33. resources.srcDirs = ['src']
  34. aidl.srcDirs = ['src']
  35. renderscript.srcDirs = ['src']
  36. res.srcDirs = ['res']
  37. assets.srcDirs = ['assets']
  38. }
  39. // Move the tests to tests/java, tests/res, etc...
  40. instrumentTest.setRoot('tests')
  41. // Move the build types to build-types/<type>
  42. // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
  43. // This moves them out of them default location under src/<type>/... which would
  44. // conflict with src/ being used by the main source set.
  45. // Adding new build types or product flavors should be accompanied
  46. // by a similar customization.
  47. debug.setRoot('build-types/debug')
  48. release.setRoot('build-types/release')
  49. }
  50. // signing for release only works in the console
  51. boolean doSigningForRelease = System.console() != null
  52. if (doSigningForRelease) {
  53. signingConfigs {
  54. release {
  55. storeFile file(System.console().readLine("\n\$ Enter keystore path: "))
  56. storePassword System.console().readLine("\n\$ Enter keystore password: ")
  57. keyAlias System.console().readLine("\n\$ Enter key alias: ")
  58. keyPassword System.console().readLine("\n\$ Enter key password: ")
  59. }
  60. }
  61. }
  62. buildTypes {
  63. debug {
  64. debuggable true
  65. jniDebugBuild true
  66. }
  67. if (doSigningForRelease) {
  68. release {
  69. debuggable false
  70. jniDebugBuild false
  71. signingConfig signingConfigs.release
  72. }
  73. }
  74. }
  75. lintOptions {
  76. abortOnError false
  77. }
  78. }