build.gradle 6.9 KB

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