build.gradle 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. buildscript {
  2. repositories {
  3. mavenCentral()
  4. }
  5. dependencies {
  6. classpath 'com.android.tools.build:gradle:1.0.0'
  7. }
  8. }
  9. apply plugin: 'com.android.application'
  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.1.0"
  29. defaultConfig {
  30. versionCode 2
  31. versionName "2.0"
  32. minSdkVersion 14
  33. targetSdkVersion 19
  34. }
  35. sourceSets {
  36. main {
  37. manifest.srcFile 'AndroidManifest.xml'
  38. java.srcDirs = ['src']
  39. resources.srcDirs = ['src']
  40. aidl.srcDirs = ['src']
  41. renderscript.srcDirs = ['src']
  42. res.srcDirs = ['res']
  43. assets.srcDirs = ['assets']
  44. }
  45. // Move the tests to tests/java, tests/res, etc...
  46. instrumentTest.setRoot('tests')
  47. // Move the build types to build-types/<type>
  48. // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
  49. // This moves them out of them default location under src/<type>/... which would
  50. // conflict with src/ being used by the main source set.
  51. // Adding new build types or product flavors should be accompanied
  52. // by a similar customization.
  53. debug.setRoot('build-types/debug')
  54. release.setRoot('build-types/release')
  55. }
  56. // signing for release only works in the console
  57. boolean doSigningForRelease = System.console() != null
  58. if (doSigningForRelease) {
  59. signingConfigs {
  60. release {
  61. storeFile file(System.console().readLine("\n\$ Enter keystore path: "))
  62. storePassword System.console().readLine("\n\$ Enter keystore password: ")
  63. keyAlias System.console().readLine("\n\$ Enter key alias: ")
  64. keyPassword System.console().readLine("\n\$ Enter key password: ")
  65. }
  66. }
  67. }
  68. buildTypes {
  69. debug {
  70. debuggable true
  71. jniDebuggable true
  72. }
  73. if (doSigningForRelease) {
  74. release {
  75. debuggable false
  76. jniDebuggable false
  77. signingConfig signingConfigs.release
  78. }
  79. }
  80. }
  81. lintOptions {
  82. abortOnError false
  83. }
  84. }