build.gradle 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'io.fabric'// Firebase Crashlytics
  3. // Create a variable called keystorePropertiesFile, and initialize it to your
  4. // keystore.properties file, in the rootProject folder.
  5. def keystorePropertiesFile = rootProject.file("keystore.properties")
  6. // Initialize a new Properties() object called keystoreProperties.
  7. def keystoreProperties = new Properties()
  8. // Load your keystore.properties file into the keystoreProperties object.
  9. keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  10. def todayDate = new Date().format("yyyyMMdd")
  11. def buildNumber = "01"
  12. def buildStep = "sp01"
  13. android {
  14. compileSdkVersion 27
  15. defaultConfig {
  16. applicationId "kr.co.hanwha.hifive"
  17. minSdkVersion 21
  18. targetSdkVersion 25
  19. versionCode 1
  20. versionName '1.5.1'
  21. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  22. multiDexEnabled true
  23. buildConfigField "String", "REVISION", "\"${todayDate}${buildNumber}\""
  24. buildConfigField "String", "RC", "\"${buildStep}\""
  25. buildConfigField "String", "WEB_REAL_URL", "\"https://qtalk.hanwhalife.com/newgw/b/v2\""
  26. buildConfigField "String", "WEB_DEV_URL", "\"https://qtalk-dev.hanwhalife.com/newgw/b/v2\""
  27. buildConfigField "String", "WEB_LOCAL_URL", "\"http://192.168.0.27:38999/b/v2\""
  28. buildConfigField "String", "REAL_URL", "\"https://qtalk.hanwhalife.com/newgw/a/v2\""
  29. buildConfigField "String", "DEV_URL", "\"https://qtalk-dev.hanwhalife.com/newgw/a/v2\""
  30. buildConfigField "String", "LOCAL_URL", "\"http://192.168.0.38:38999/a/v2\""
  31. buildConfigField "String", "DOWNLOAD_URL", "\"http://qtalk.hanwhalife.com/downloads/\""
  32. }
  33. signingConfigs {
  34. release {
  35. keyAlias keystoreProperties['keyAlias']
  36. keyPassword keystoreProperties['keyPassword']
  37. storeFile file(keystoreProperties['storeFile'])
  38. storePassword keystoreProperties['storePassword']
  39. v1SigningEnabled true
  40. v2SigningEnabled true
  41. }
  42. }
  43. buildTypes {
  44. release {
  45. debuggable false
  46. minifyEnabled false
  47. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  48. signingConfig signingConfigs.release
  49. buildConfigField "String", "SERVER_TYPE", "\"REAL\""
  50. buildConfigField "int", "BUILD_NUMBER", "01"
  51. buildConfigField "String", "HF_KEY_GA_LOG_EVENT", "\"HF_REAL_EVENT\""
  52. }
  53. debug {
  54. debuggable true
  55. minifyEnabled false
  56. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  57. buildConfigField "String", "SERVER_TYPE", "\"DEV\""
  58. buildConfigField "int", "BUILD_NUMBER", "01"
  59. buildConfigField "String", "HF_KEY_GA_LOG_EVENT", "\"HF_EVENT\""
  60. }
  61. }
  62. }
  63. android.applicationVariants.all { variant ->
  64. variant.outputs.all {
  65. def buildName = variant.buildType.name=="debug"?"dev":"prd"
  66. // def buildNumber = variant.buildType.buildConfigFields.get("BUILD_NUMBER").value
  67. outputFileName = "HIFIVE_${buildName}_v.${variant.versionName}_rv_${todayDate}${buildNumber}.apk"
  68. }
  69. }
  70. dependencies {
  71. implementation fileTree(include: ['*.jar'], dir: 'libs')
  72. // implementation 'com.android.support:appcompat-v7:26.1.0'
  73. // implementation 'com.android.support:design:26.1.0'
  74. implementation 'com.android.support:appcompat-v7:27.1.1'
  75. implementation 'com.android.support:design:27.1.1'
  76. implementation 'com.android.support.constraint:constraint-layout:1.0.2'
  77. implementation 'com.google.firebase:firebase-messaging:11.8.0'
  78. implementation 'com.google.firebase:firebase-core:11.8.0'
  79. /**
  80. * Test Unit
  81. */
  82. testImplementation 'junit:junit:4.12'
  83. androidTestImplementation 'com.android.support.test:runner:1.0.1'
  84. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
  85. // compile 'com.android.support:design:26.1.0'
  86. /**
  87. * Network
  88. */
  89. implementation 'com.squareup.okhttp3:okhttp:3.7.0'
  90. /**
  91. * Json
  92. */
  93. implementation 'com.google.code.gson:gson:2.8.1'
  94. /**
  95. * Support
  96. */
  97. releaseImplementation('com.crashlytics.sdk.android:crashlytics:2.7.0-SNAPSHOT@aar') {
  98. // Firebase Crashlytics
  99. transitive = true
  100. }
  101. /**
  102. * 이미지 로더
  103. */
  104. implementation 'com.github.bumptech.glide:glide:4.7.1'
  105. /**
  106. * Logger
  107. */
  108. implementation 'com.jakewharton.timber:timber:4.7.1'
  109. }
  110. apply plugin: 'com.google.gms.google-services'