build.gradle 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'com.google.gms.google-services'
  3. apply plugin: 'io.fabric'
  4. apply plugin: 'com.google.firebase.firebase-perf'
  5. def keystoreProperties = new Properties()
  6. keystoreProperties.load(new FileInputStream(rootProject.file("keystore.properties")))
  7. def developProperties = new Properties()
  8. try {
  9. developProperties.load(new FileInputStream(rootProject.file("develop.properties")))
  10. } catch (ignored) {
  11. developProperties['DEV_USER_1'] = ""
  12. developProperties['PRODUCT_USER_1'] = ""
  13. developProperties['DEV_USER_2'] = ""
  14. developProperties['PRODUCT_USER_2'] = ""
  15. }
  16. android {
  17. signingConfigs {
  18. // debug {
  19. // keyAlias 'lifeplus_debug'
  20. // keyPassword 'lifeplus_debug'
  21. // storeFile rootProject.file("keystore/lifeplus_debug")
  22. // storePassword 'lifeplus_debug'
  23. // }
  24. release {
  25. storeFile rootProject.file(keystoreProperties['storeFile'])
  26. storePassword keystoreProperties['storePassword']
  27. keyAlias keystoreProperties['keyAlias']
  28. keyPassword keystoreProperties['keyPassword']
  29. }
  30. }
  31. compileSdkVersion 27
  32. defaultConfig {
  33. applicationId "kr.co.zumo.app"
  34. minSdkVersion 19 // 4.4
  35. targetSdkVersion 27
  36. versionCode 169
  37. versionName "4.0.0.131"
  38. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  39. multiDexEnabled true
  40. vectorDrawables.useSupportLibrary = true
  41. }
  42. buildTypes {
  43. release {
  44. minifyEnabled false
  45. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  46. signingConfig signingConfigs.release
  47. }
  48. debug {
  49. versionNameSuffix "-debug"
  50. manifestPlaceholders = [appLabel: "@string/app_name_debug"]
  51. signingConfig signingConfigs.release
  52. // signingConfig signingConfigs.debug
  53. }
  54. }
  55. sourceSets {
  56. /*
  57. - dev <-> product = NetworkConfig 를 다르게 설정
  58. - sandbox <-> common = sandbox 로 사용할 Class 를 설정
  59. */
  60. sandbox {
  61. java.srcDirs = ['src/dev/java', 'src/sandbox/java']
  62. }
  63. dev {
  64. java.srcDirs = ['src/dev/java', 'src/common/java']
  65. }
  66. product {
  67. java.srcDirs = ['src/product/java', 'src/common/java']
  68. }
  69. }
  70. flavorDimensions "build"
  71. productFlavors {
  72. sandbox {
  73. versionNameSuffix "-sandbox"
  74. manifestPlaceholders = [appLabel: "@string/app_name"]
  75. // defining the test properties
  76. buildConfigField "String", "DEV_USER_1", "\"" + developProperties['DEV_USER_1'] + "\""
  77. buildConfigField "String", "PRODUCT_USER_1", "\"" + developProperties['PRODUCT_USER_1'] + "\""
  78. buildConfigField "String", "DEV_USER_2", "\"" + developProperties['DEV_USER_2'] + "\""
  79. buildConfigField "String", "PRODUCT_USER_2", "\"" + developProperties['PRODUCT_USER_2'] + "\""
  80. }
  81. dev {
  82. versionNameSuffix "-dev"
  83. manifestPlaceholders = [appLabel: "@string/app_name"]
  84. // defining the test properties
  85. buildConfigField "String", "DEV_USER_1", "\"" + developProperties['DEV_USER_1'] + "\""
  86. buildConfigField "String", "PRODUCT_USER_1", "\"" + developProperties['PRODUCT_USER_1'] + "\""
  87. buildConfigField "String", "DEV_USER_2", "\"" + developProperties['DEV_USER_2'] + "\""
  88. buildConfigField "String", "PRODUCT_USER_2", "\"" + developProperties['PRODUCT_USER_2'] + "\""
  89. }
  90. product {
  91. versionNameSuffix ""
  92. manifestPlaceholders = [appLabel: "@string/app_name"]
  93. // defining the test properties
  94. buildConfigField "String", "DEV_USER_1", "\"\""
  95. buildConfigField "String", "PRODUCT_USER_1", "\"\""
  96. buildConfigField "String", "DEV_USER_2", "\"\""
  97. buildConfigField "String", "PRODUCT_USER_2", "\"\""
  98. }
  99. }
  100. applicationVariants.all { variant ->
  101. variant.outputs.all { output ->
  102. def SEP = "_"
  103. def buildType = variant.variantData.variantConfiguration.buildType.name
  104. def version = variant.versionName
  105. def newApkName
  106. if (buildType == "release") {
  107. newApkName = "zumo" + SEP + buildType + SEP + version + ".apk"
  108. } else {
  109. newApkName = "zumo" + ".apk"
  110. }
  111. outputFileName = new File(newApkName)
  112. }
  113. }
  114. compileOptions {
  115. sourceCompatibility JavaVersion.VERSION_1_8
  116. targetCompatibility JavaVersion.VERSION_1_8
  117. }
  118. testOptions {
  119. unitTests {
  120. includeAndroidResources = true
  121. returnDefaultValues = true
  122. }
  123. }
  124. }
  125. dependencies {
  126. implementation fileTree(include: ['*.jar'], dir: 'libs')
  127. implementation 'com.android.support:appcompat-v7:27.1.1'
  128. implementation 'com.android.support:exifinterface:27.1.1'
  129. implementation 'com.android.support:cardview-v7:27.1.1'
  130. implementation 'com.android.support:customtabs:27.1.1'
  131. implementation 'com.android.support:design:27.1.1'
  132. implementation 'com.android.support.constraint:constraint-layout:1.1.3'
  133. implementation 'com.android.support:support-v4:27.1.1'
  134. implementation 'com.android.support:recyclerview-v7:27.1.1'
  135. implementation 'android.arch.lifecycle:extensions:1.1.1'
  136. implementation 'android.arch.lifecycle:viewmodel:1.1.1'
  137. implementation 'com.google.firebase:firebase-messaging:17.5.0'
  138. implementation 'com.google.firebase:firebase-dynamic-links:16.1.8'
  139. implementation 'com.google.firebase:firebase-core:16.0.8'
  140. implementation 'com.google.firebase:firebase-config:16.4.1'
  141. /*********************************
  142. * External lib
  143. *********************************/
  144. implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
  145. implementation 'com.google.android.gms:play-services-plus:16.0.0'
  146. implementation 'com.google.code.gson:gson:2.8.5'
  147. implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
  148. implementation 'com.squareup.retrofit2:retrofit:2.4.0'
  149. implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
  150. implementation('com.squareup.retrofit2:converter-gson:2.3.0') {
  151. exclude group: 'com.google.code.gson', module: 'gson'
  152. }
  153. implementation 'com.github.bumptech.glide:glide:4.8.0'
  154. annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
  155. implementation 'com.kakao.sdk:kakaolink:1.14.0'
  156. implementation 'com.facebook.android:facebook-share:4.38.1'
  157. implementation 'com.githang:status-bar-compat:0.7'
  158. implementation 'com.wefika:flowlayout:0.4.1'
  159. implementation 'me.everything:overscroll-decor-android:1.0.4'
  160. // implementation 'com.robinhood.ticker:ticker:2.0.1'
  161. // implementation 'com.squareup.picasso:picasso:2.71828'
  162. // implementation 'jp.wasabeef:picasso-transformations:2.2.1'
  163. // ZUMO
  164. implementation 'com.google.android.gms:play-services-auth:16.0.0'
  165. implementation 'com.google.android.gms:play-services-analytics:16.0.8'
  166. implementation 'com.kakao.sdk:usermgmt:1.14.0'
  167. implementation 'com.kakao.sdk:kakaotalk:1.14.0'
  168. // Naver login sdk
  169. implementation files('libs/3rdparty_login_library_android_4.1.4.jar')
  170. // Advertise platform
  171. implementation files('libs/buzzad-android-sdk-advertiser-1.0.1.jar')
  172. implementation files('libs/cashslide-sdk20170320.jar')
  173. implementation files('libs/libNswitchSDK_v1.1.2.jar')
  174. implementation files('libs/tnkad-sdk.jar')
  175. // Crashlytics
  176. implementation 'com.google.firebase:firebase-core:16.0.7'
  177. implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'
  178. // Performance
  179. implementation 'com.google.firebase:firebase-perf:16.2.4'
  180. /*********************************
  181. * UNIT TEST
  182. *********************************/
  183. // Required for local unit tests (JUnit 4 framework)
  184. testImplementation 'junit:junit:4.12'
  185. // Required for instrumented tests
  186. androidTestImplementation 'com.android.support.test:runner:1.0.2'
  187. androidTestImplementation 'com.android.support.test:rules:1.0.2'
  188. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  189. androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:3.0.2'
  190. androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
  191. // Mockito
  192. // testImplementation "org.mockito:mockito-core:2.21.0"
  193. // Robolectric
  194. testImplementation 'org.robolectric:robolectric:3.8'
  195. testImplementation 'org.robolectric:shadows-support-v4:3.3.2'
  196. testImplementation 'org.robolectric:multidex:3.4.2'
  197. // PowerMock
  198. testImplementation 'org.powermock:powermock-core:1.7.4'
  199. testImplementation 'org.powermock:powermock-module-junit4:1.7.4'
  200. testImplementation 'org.powermock:powermock-api-mockito2:1.7.4'
  201. }