build.gradle 8.7 KB

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