build.gradle 2.7 KB

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