build.gradle 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. buildscript {
  2. ext.kotlin_version = '1.3.21'
  3. repositories {
  4. google()
  5. jcenter()
  6. }
  7. dependencies {
  8. classpath 'com.android.tools.build:gradle:3.3.2'
  9. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  10. }
  11. }
  12. /* gets the version name from the latest Git tag, stripping the leading v off */
  13. def getVersionName = { ->
  14. def stdout = new ByteArrayOutputStream()
  15. exec {
  16. commandLine 'git', 'describe', '--tags', '--always', '--abbrev=0'
  17. standardOutput = stdout
  18. }
  19. return stdout.toString().trim()
  20. }
  21. apply plugin: 'com.android.application'
  22. apply plugin: 'kotlin-android'
  23. apply plugin: 'kotlin-android-extensions'
  24. apply plugin: 'kotlin-kapt'
  25. repositories {
  26. google()
  27. jcenter()
  28. maven { url 'https://github.com/FireZenk/maven-repo/raw/master/' }
  29. maven { url 'https://jitpack.io' }
  30. }
  31. allprojects {
  32. project.ext {
  33. // these are common variables used in */build.gradle
  34. version_number = getVersionName()
  35. group_info = "haven"
  36. buildToolsVersion = "28.0.3"
  37. minSdkVersion = 16
  38. targetSdkVersion = 28
  39. }
  40. /**
  41. gradle.projectsEvaluated {
  42. tasks.withType(JavaCompile) {
  43. options.compilerArgs << "-Xlint:unchecked"
  44. }
  45. }**/
  46. }
  47. android {
  48. compileSdkVersion 28
  49. buildToolsVersion = '28.0.3'
  50. packagingOptions {
  51. exclude 'META-INF/LICENSE.txt'
  52. exclude 'META-INF/NOTICE.txt'
  53. exclude 'META-INF/DEPENDENCIES'
  54. exclude 'META-INF/NOTICE'
  55. exclude 'META-INF/LICENSE'
  56. exclude 'META-INF/LICENSE.txt'
  57. exclude 'META-INF/NOTICE.txt'
  58. }
  59. dexOptions {
  60. javaMaxHeapSize "2g"
  61. preDexLibraries true
  62. }
  63. defaultConfig {
  64. applicationId "org.havenapp.main"
  65. versionCode 214
  66. versionName getVersionName()
  67. archivesBaseName = "Haven-$versionName"
  68. minSdkVersion 16
  69. targetSdkVersion 28
  70. compileOptions {
  71. sourceCompatibility JavaVersion.VERSION_1_8
  72. targetCompatibility JavaVersion.VERSION_1_8
  73. }
  74. multiDexEnabled true
  75. vectorDrawables.useSupportLibrary = true
  76. // renderscriptTargetApi 16
  77. // renderscriptSupportModeEnabled true
  78. ndk {
  79. abiFilters "armeabi", "armeabi-v7a", "x86"
  80. }
  81. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  82. // clear app state completely between tests
  83. testInstrumentationRunnerArguments clearPackageData: 'true'
  84. javaCompileOptions {
  85. annotationProcessorOptions {
  86. arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
  87. }
  88. }
  89. }
  90. buildTypes {
  91. release {
  92. minifyEnabled false
  93. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
  94. }
  95. }
  96. compileOptions {
  97. sourceCompatibility JavaVersion.VERSION_1_8
  98. targetCompatibility JavaVersion.VERSION_1_8
  99. }
  100. lintOptions {
  101. checkReleaseBuilds false
  102. abortOnError false
  103. }
  104. sourceSets {
  105. androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
  106. }
  107. }
  108. configurations {
  109. all*.exclude group: 'com.google.guava', module: 'listenablefuture'
  110. }
  111. dependencies {
  112. implementation 'androidx.appcompat:appcompat:1.0.2'
  113. implementation 'androidx.cardview:cardview:1.0.0'
  114. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  115. implementation 'androidx.preference:preference:1.1.0-alpha03'
  116. implementation 'androidx.multidex:multidex:2.0.1'
  117. implementation 'androidx.annotation:annotation:1.0.1'
  118. implementation 'com.google.android.material:material:1.0.0'
  119. implementation 'com.wdullaer:materialdatetimepicker:4.1.1'
  120. implementation 'com.github.guardianproject:signal-cli-android:v0.6.0-android-beta-1'
  121. implementation 'net.the4thdimension:audio-wife:1.0.3'
  122. implementation 'com.github.AppIntro:AppIntro:v5.1.0'
  123. implementation 'info.guardianproject.netcipher:netcipher:2.0.0-beta1'
  124. implementation 'org.nanohttpd:nanohttpd-webserver:2.3.1'
  125. implementation 'me.angrybyte.picker:picker:1.3.1'
  126. implementation 'com.github.stfalcon:frescoimageviewer:0.5.0'
  127. implementation 'com.facebook.fresco:fresco:1.10.0'
  128. implementation 'com.github.derlio:audio-waveform:v1.0.1'
  129. implementation 'org.firezenk:audiowaves:1.1@aar'
  130. implementation 'com.maxproj.simplewaveform:app:1.0.0'
  131. implementation 'com.googlecode.libphonenumber:libphonenumber:8.10.4'
  132. implementation('com.mikepenz:aboutlibraries:6.1.1@aar') {
  133. transitive = true
  134. }
  135. implementation 'com.github.halilozercan:BetterVideoPlayer:1.1.0'
  136. implementation 'com.github.ybq:Android-SpinKit:1.2.0'
  137. implementation 'io.github.silvaren:easyrs:0.5.3'
  138. implementation 'org.jcodec:jcodec:0.2.3'
  139. implementation 'org.jcodec:jcodec-android:0.2.3'
  140. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  141. // Room
  142. implementation "android.arch.persistence.room:runtime:1.1.1"
  143. kapt "android.arch.persistence.room:compiler:1.1.1"
  144. implementation "android.arch.lifecycle:runtime:1.1.1"
  145. implementation "android.arch.lifecycle:extensions:1.1.1"
  146. testImplementation "junit:junit:4.12"
  147. androidTestImplementation 'androidx.test:runner:1.1.1'
  148. androidTestImplementation 'androidx.test:core:1.1.0'
  149. androidTestImplementation 'androidx.test:rules:1.1.1'
  150. androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
  151. androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.1'
  152. androidTestImplementation "android.arch.persistence.room:testing:1.1.1"
  153. // android-job
  154. implementation 'com.evernote:android-job:1.2.6'
  155. // new camera view: https://github.com/natario1/CameraView
  156. implementation 'com.otaliastudios:cameraview:2.0.0-beta04'
  157. }