build.gradle 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. plugins {
  2. id 'java'
  3. }
  4. group = 'com.utic.its'
  5. version = '0.0.1'
  6. compileJava.options.encoding = 'UTF-8'
  7. repositories {
  8. mavenLocal()
  9. mavenCentral()
  10. def os = org.gradle.internal.os.OperatingSystem.current()
  11. if (os.isWindows()) {
  12. flatDir {
  13. dirs 'C:/java/repository/'
  14. }
  15. } else {
  16. flatDir {
  17. dirs '/Users/openvalue/Projects/java/repository/'
  18. }
  19. }
  20. }
  21. dependencies {
  22. // lombok 라이브러리 추가 시작
  23. compileOnly 'org.projectlombok:lombok'
  24. annotationProcessor 'org.projectlombok:lombok'
  25. testCompileOnly 'org.projectlombok:lombok'
  26. testAnnotationProcessor 'org.projectlombok:lombok'
  27. // lombok 라이브러리 추가 끝
  28. implementation 'org.springframework.boot:spring-boot-starter-web'
  29. implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.1'
  30. implementation 'org.springframework.boot:spring-boot-starter-aop'
  31. implementation 'com.its:its-common:0.0.1'
  32. // implementation 'com.its:its-network:0.0.1'
  33. implementation 'com.its:its-spring:0.0.1'
  34. implementation 'com.its:utic-its-asn1:0.0.1'
  35. implementation 'com.its:utic-its-common:0.0.1'
  36. }
  37. //sourceSets {
  38. // main {
  39. // resources {
  40. // srcDir 'src/main/resources'
  41. // include 'mybatis/mapper/**/*.xml'
  42. // }
  43. // }
  44. //}
  45. //processResources {
  46. // from(sourceSets.main.resources.srcDirs) {
  47. // include '**/*'
  48. // }
  49. // duplicatesStrategy = DuplicatesStrategy.EXCLUDE
  50. //}
  51. //processResources {
  52. // from('src/main/resources') {
  53. // include '**/*.xml'
  54. // }
  55. //// duplicatesStrategy = DuplicatesStrategy.INCLUDE // 또는 EXCLUDE, WARN
  56. //}
  57. processResources {
  58. enabled = true
  59. }
  60. jar {
  61. enabled = true
  62. }
  63. test {
  64. useJUnitPlatform()
  65. }
  66. tasks.register('runInstallJarLibrary', Exec) {
  67. doFirst {
  68. println "utic-its-local library install mvn repository..."
  69. def os = org.gradle.internal.os.OperatingSystem.current()
  70. workingDir = file('.')
  71. if (os.isWindows()) {
  72. commandLine 'cmd', '/C', 'start', 'install.bat'
  73. } else {
  74. commandLine 'sh', './install.sh'
  75. }
  76. }
  77. }
  78. jar.finalizedBy runInstallJarLibrary
  79. tasks.withType(JavaCompile).configureEach {
  80. options.compilerArgs << '-Xlint:unchecked'
  81. options.deprecation = true
  82. options.encoding = 'UTF-8'
  83. }