build.gradle 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'witness'
  3. dependencies {
  4. def supportVersion = '23.2.1'
  5. compile project(':briar-core')
  6. compile project(':bramble-android')
  7. compile fileTree(dir: 'libs', include: '*.jar')
  8. compile "com.android.support:support-v4:$supportVersion"
  9. compile("com.android.support:appcompat-v7:$supportVersion") {
  10. exclude module: 'support-v4'
  11. }
  12. compile("com.android.support:preference-v14:$supportVersion") {
  13. exclude module: 'support-v4'
  14. }
  15. compile("com.android.support:design:$supportVersion") {
  16. exclude module: 'support-v4'
  17. exclude module: 'recyclerview-v7'
  18. }
  19. compile "com.android.support:cardview-v7:$supportVersion"
  20. compile 'com.android.support:support-annotations:23.4.0'
  21. compile('ch.acra:acra:4.8.5') {
  22. exclude module: 'support-v4'
  23. exclude module: 'support-annotations'
  24. }
  25. compile 'info.guardianproject.panic:panic:0.5'
  26. compile 'info.guardianproject.trustedintents:trustedintents:0.2'
  27. compile 'de.hdodenhof:circleimageview:2.1.0'
  28. compile 'com.google.zxing:core:3.2.1'
  29. provided 'javax.annotation:jsr250-api:1.0'
  30. compile 'com.jpardogo.materialtabstrip:library:1.1.0'
  31. compile 'com.github.bumptech.glide:glide:3.7.0'
  32. compile 'uk.co.samuelwall:material-tap-target-prompt:1.3.0'
  33. testCompile project(path: ':bramble-core', configuration: 'testOutput')
  34. testCompile 'org.robolectric:robolectric:3.0'
  35. testCompile 'org.mockito:mockito-core:1.10.19'
  36. }
  37. dependencyVerification {
  38. verify = [
  39. 'ch.acra:acra:afd5b28934d5166b55f261c85685ad59e8a4ebe9ca1960906afaa8c76d8dc9eb',
  40. 'info.guardianproject.panic:panic:a7ed9439826db2e9901649892cf9afbe76f00991b768d8f4c26332d7c9406cb2',
  41. 'info.guardianproject.trustedintents:trustedintents:6221456d8821a8d974c2acf86306900237cf6afaaa94a4c9c44e161350f80f3e',
  42. 'de.hdodenhof:circleimageview:bcbc588e19e6dcf8c120b1957776bfe229efba5d2fbe5da7156372eeacf65503',
  43. 'com.google.zxing:core:b4d82452e7a6bf6ec2698904b332431717ed8f9a850224f295aec89de80f2259',
  44. 'com.android.support:support-v4:81ce890f26d35c75ad17d0f998a7e3230330c3b41e0b629566bc744bee89e448',
  45. 'com.android.support:appcompat-v7:00f9d93acacd6731f309724054bf51492814b4b2869f16d7d5c0038dcb8c9a0d',
  46. 'com.android.support:preference-v14:44881bb46094e86d0bc2426f205419674a5b4eb514b44b5a4659b5de29f71eb7',
  47. 'com.android.support:design:003e0c0bea0a6891f8b2bc43f20ae7af2a49a17363e5bb10df5ee0bae12fa686',
  48. 'com.android.support:support-annotations:e91a88dd0c5e99069b7f09d4a46b5e06f1e9c4c72fc0a8e987e25d86af480f01',
  49. 'com.android.support:animated-vector-drawable:06d1963b85aa917099d7757e6a7b3e4dc06889413dc747f625ae8683606db3a1',
  50. 'com.android.support:support-vector-drawable:799bafe4c3de812386f0b291f744d5d6876452722dd40189b9ab87dbbf594ea1',
  51. 'com.android.support:recyclerview-v7:44040a888e23e0c93162a3377cfe06751080e3c22d369ab0d4301ef60d63b0fe',
  52. 'com.android.support:preference-v7:775101bd07bd052e455761c5c5d9523d7ad59f2f320e3e8cbde241fd6b1d6025',
  53. 'com.android.support:cardview-v7:4595f1c4a28cfa083b6c0920ad4d49e1c2ca4b8302a955e548f68eb63b74931b',
  54. 'com.jpardogo.materialtabstrip:library:24d19232b319f8c73e25793432357919a7ed972186f57a3b2c9093ea74ad8311',
  55. 'com.github.bumptech.glide:glide:76ef123957b5fbaebb05fcbe6606dd58c3bc3fcdadb257f99811d0ac9ea9b88b',
  56. 'uk.co.samuelwall:material-tap-target-prompt:f67e1caead12a914525b32cbf6da52a96b93ff89573f93cb41102ef3130fb64a',
  57. ]
  58. }
  59. def getGitHash = { ->
  60. def stdout = new ByteArrayOutputStream()
  61. try {
  62. exec {
  63. commandLine 'git', 'rev-parse', '--short', 'HEAD'
  64. standardOutput = stdout
  65. }
  66. return stdout.toString().trim()
  67. } catch (Exception ignored) {
  68. return "No commit hash"
  69. }
  70. }
  71. android {
  72. compileSdkVersion 23
  73. buildToolsVersion "23.0.3"
  74. defaultConfig {
  75. minSdkVersion 14
  76. targetSdkVersion 22
  77. resValue "string", "app_package", "org.briarproject.briar"
  78. buildConfigField "String", "GitHash", "\"${getGitHash()}\""
  79. }
  80. buildTypes {
  81. debug {
  82. shrinkResources false
  83. minifyEnabled true
  84. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
  85. }
  86. release {
  87. shrinkResources true
  88. minifyEnabled true
  89. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
  90. }
  91. }
  92. compileOptions {
  93. sourceCompatibility JavaVersion.VERSION_1_7
  94. targetCompatibility JavaVersion.VERSION_1_7
  95. }
  96. lintOptions {
  97. warning 'MissingTranslation'
  98. warning 'ImpliedQuantity'
  99. }
  100. }