build.gradle 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. apply plugin: 'com.android.application'
  2. android {
  3. signingConfigs {
  4. // debug {
  5. // keyAlias 'lifeplus_debug'
  6. // keyPassword 'lifeplus_debug'
  7. // storeFile rootProject.file("keystore/lifeplus_debug")
  8. // storePassword 'lifeplus_debug'
  9. // }
  10. release {
  11. keyAlias 'yeongyun_zumo'
  12. keyPassword 'yy0906'
  13. storeFile rootProject.file("keystore/yeongyun.jks")
  14. storePassword 'yy0906'
  15. }
  16. }
  17. compileSdkVersion 27
  18. defaultConfig {
  19. applicationId "kr.co.zumo.app"
  20. minSdkVersion 19 // 4.4
  21. targetSdkVersion 27
  22. versionCode 149
  23. versionName "4.0.0"
  24. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  25. multiDexEnabled true
  26. }
  27. buildTypes {
  28. release {
  29. minifyEnabled false
  30. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  31. signingConfig signingConfigs.release
  32. }
  33. debug {
  34. versionNameSuffix "-debug"
  35. manifestPlaceholders = [appLabel: "@string/app_name_debug"]
  36. signingConfig signingConfigs.release
  37. // signingConfig signingConfigs.debug
  38. }
  39. }
  40. sourceSets {
  41. /*
  42. - dev / product = NetworkConfig 를 다르게 설정
  43. - sandbox / common = LifeplusAPIRepository 를 설정
  44. */
  45. sandbox {
  46. java.srcDirs = ['src/dev/java', 'src/sandbox/java']
  47. }
  48. dev {
  49. java.srcDirs = ['src/dev/java', 'src/common/java']
  50. }
  51. product {
  52. java.srcDirs = ['src/product/java', 'src/common/java']
  53. }
  54. }
  55. flavorDimensions "build"
  56. productFlavors {
  57. sandbox {
  58. versionNameSuffix "-sandbox"
  59. manifestPlaceholders = [appLabel: "@string/app_name"]
  60. }
  61. dev {
  62. versionNameSuffix "-dev"
  63. manifestPlaceholders = [appLabel: "@string/app_name"]
  64. }
  65. product {
  66. versionNameSuffix ""
  67. manifestPlaceholders = [appLabel: "@string/app_name"]
  68. }
  69. }
  70. applicationVariants.all { variant ->
  71. variant.outputs.all { output ->
  72. def SEP = "_"
  73. def buildType = variant.variantData.variantConfiguration.buildType.name
  74. def version = variant.versionName
  75. def formattedDate = new Date().format('yyMMddHHmm')
  76. def newApkName = "lifeplus" + SEP + buildType + SEP + version + SEP + formattedDate + ".apk"
  77. outputFileName = new File(newApkName)
  78. }
  79. }
  80. compileOptions {
  81. sourceCompatibility JavaVersion.VERSION_1_8
  82. targetCompatibility JavaVersion.VERSION_1_8
  83. }
  84. testOptions {
  85. unitTests {
  86. includeAndroidResources = true
  87. returnDefaultValues = true
  88. }
  89. }
  90. }
  91. dependencies {
  92. implementation fileTree(dir: 'libs', include: ['*.jar'])
  93. implementation 'com.android.support:appcompat-v7:27.1.1'
  94. implementation 'com.android.support:design:27.1.1'
  95. implementation 'com.android.support.constraint:constraint-layout:1.1.3'
  96. implementation 'com.android.support:support-v4:27.1.1'
  97. implementation 'com.android.support:recyclerview-v7:27.1.1'
  98. implementation 'com.google.android.gms:play-services-plus:15.0.1'
  99. implementation 'com.google.code.gson:gson:2.8.5'
  100. implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
  101. implementation 'com.squareup.retrofit2:retrofit:2.4.0'
  102. implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
  103. implementation('com.squareup.retrofit2:converter-gson:2.3.0')
  104. {
  105. exclude group: 'com.google.code.gson', module: 'gson'
  106. }
  107. implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
  108. implementation "android.arch.lifecycle:extensions:1.1.1"
  109. implementation "android.arch.lifecycle:viewmodel:1.1.1"
  110. /*********************************
  111. * UNIT TEST
  112. *********************************/
  113. // Required for local unit tests (JUnit 4 framework)
  114. testImplementation 'junit:junit:4.12'
  115. // Required for instrumented tests
  116. androidTestImplementation 'com.android.support.test:runner:1.0.2'
  117. androidTestImplementation 'com.android.support.test:rules:1.0.2'
  118. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  119. androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:3.0.2'
  120. androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
  121. // Mockito
  122. // testImplementation "org.mockito:mockito-core:2.21.0"
  123. // Robolectric
  124. testImplementation 'org.robolectric:robolectric:3.8'
  125. testImplementation "org.robolectric:shadows-support-v4:3.3.2"
  126. testImplementation "org.robolectric:multidex:3.4.2"
  127. // PowerMock
  128. testImplementation 'org.powermock:powermock-core:1.7.4'
  129. testImplementation "org.powermock:powermock-module-junit4:1.7.4"
  130. testImplementation "org.powermock:powermock-api-mockito2:1.7.4"
  131. }