build.gradle 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'kotlin-android'
  3. apply plugin: 'kotlin-android-extensions'
  4. apply plugin: 'kotlin-kapt'
  5. android {
  6. compileSdkVersion rootProject.compileSdkVersion
  7. buildToolsVersion "29.0.3"
  8. defaultConfig {
  9. applicationId "com.mrozon.healthdiary"
  10. minSdkVersion rootProject.minSdkVersion
  11. targetSdkVersion rootProject.targetSdkVersion
  12. versionCode 1
  13. versionName "1.0"
  14. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  15. }
  16. signingConfigs {
  17. release {
  18. prepareProperties()
  19. storeFile configStoreFile
  20. storePassword configStorePassword
  21. keyAlias configKeyAlias
  22. keyPassword configKeyPassword
  23. }
  24. }
  25. buildTypes {
  26. release {
  27. minifyEnabled true
  28. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  29. signingConfig signingConfigs.release
  30. }
  31. staging {
  32. minifyEnabled true
  33. signingConfig debug.signingConfig
  34. }
  35. }
  36. dataBinding {
  37. enabled = true
  38. }
  39. compileOptions {
  40. sourceCompatibility JavaVersion.VERSION_1_8
  41. targetCompatibility JavaVersion.VERSION_1_8
  42. }
  43. kotlinOptions {
  44. jvmTarget = '1.8'
  45. }
  46. lintOptions {
  47. ignoreTestSources true
  48. abortOnError true
  49. xmlReport false
  50. baselineFile file("$project.rootDir/config/baseline.xml")
  51. checkDependencies true
  52. }
  53. }
  54. apply from: "$project.rootDir/scripts/deps_versions.gradle"
  55. dependencies {
  56. lintChecks project(':lint_repo')
  57. api project(':core_api')
  58. implementation project(':core')
  59. implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
  60. implementation dagger
  61. kapt daggerCompiler
  62. implementation navigationFragment
  63. implementation navigationUi
  64. implementation navigationDynamicFeatures
  65. implementation timber
  66. implementation constraintlayout
  67. implementation cardview
  68. implementation recyclerview
  69. implementation material
  70. implementation fileTree(dir: 'libs', include: ['*.jar'])
  71. implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
  72. implementation 'androidx.appcompat:appcompat:1.2.0'
  73. implementation 'androidx.core:core-ktx:1.3.1'
  74. testImplementation 'junit:junit:4.12'
  75. androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  76. androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  77. implementation project(':utils')
  78. implementation project(':feature_splash')
  79. implementation project(':feature_auth')
  80. implementation project(':feature_person')
  81. implementation project(':feature_measure_type')
  82. implementation project(':feature_measure')
  83. }
  84. def prepareProperties() {
  85. Properties properties = new Properties()
  86. String filePath = ""
  87. if (System.getenv("HUDSON_HOME")!=null) {
  88. filePath = System.getenv("HUDSON_HOME") + "/.keystore/keystore.properties"
  89. } else {
  90. filePath = System.getenv("HOME") + "/.keystore/keystore.properties"
  91. }
  92. System.console().println(filePath)
  93. file(filePath).with { fname ->
  94. properties.load(fname.newDataInputStream())
  95. ext.configStoreFile = file(fname.getParent() + "/" + properties['keystore'])
  96. ext.configStorePassword = properties['keystore.password']
  97. ext.configKeyAlias = properties['keyAlias']
  98. ext.configKeyPassword = properties['keyPassword']
  99. }
  100. }