build.gradle 8.2 KB

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