build.gradle 7.5 KB

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