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