build.gradle 9.1 KB

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