build.gradle 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /*
  2. * ********************************************************************************************************************
  3. *
  4. * iFHS7.
  5. * ;BBMBMBMc rZMBMBR BMB
  6. * MBEr:;PBM, 7MBMMEOBB: BBB RBW
  7. * XK: BO SB. :SZ MBM. c;; ir BBM :FFr :SSF: ;xBMB:r iuGXv. i:. iF2;
  8. * DBBM0r. :D S7 ;XMBMB GMBMu. MBM: BMB MBMBBBMBMS WMBMBMBBK MBMBMBM BMBRBMBW .MBMBMBMBB
  9. * :JMRMMD .. , 1MMRM1; ;MBMBBR: MBM ;MB: BMB: MBM. RMBr sBMH BM0 UMB, BMB. KMBv
  10. * ;. XOW B1; :uM: 1RE, i .2BMBs rMB. MBO MBO JMB; MBB MBM BBS 7MBMBOBM: MBW :BMc
  11. * OBRJ.SEE MRDOWOR, 3DE:7OBM . ;BMB RMR7BM BMB MBB. BMB ,BMR .BBZ MMB rMB, BMM rMB7
  12. * :FBRO0D0 RKXSXPR. JOKOOMPi BMBSSWBMB; BMBB: MBMB0ZMBMS .BMBOXRBMB MBMDE RBM2;SMBM; MBB xBM2
  13. * iZGE O0SHSPO. uGZ7. sBMBMBDL :BMO OZu:BMBK, rRBMB0; ,EBMB xBMBr:ER. RDU :OO;
  14. * ,BZ, 1D0 RPSFHXR. xWZ .SMr . .BBB
  15. * :0BMRDG RESSSKR. 2WOMBW; BMBMR
  16. * i0BM: SWKHKGO MBDv
  17. * .UB OOGDM. MK, Copyright (c) 2015-2019. 斯伯坦机器人
  18. * , XMW ..
  19. * r All rights reserved.
  20. *
  21. * ********************************************************************************************************************
  22. */
  23. group rootProject.group
  24. version rootProject.version
  25. apply plugin: 'kotlin'
  26. apply plugin: 'org.jetbrains.dokka'
  27. apply plugin: 'maven'
  28. sourceCompatibility = JVM_TARGET
  29. compileKotlin {
  30. kotlinOptions.jvmTarget = JVM_TARGET
  31. }
  32. compileTestKotlin {
  33. kotlinOptions.jvmTarget = JVM_TARGET
  34. }
  35. dependencies {
  36. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  37. // kotlin 依赖
  38. compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: KOTLIN_VERSION
  39. compile group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: KOTLIN_VERSION
  40. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  41. // 字符串处理工具
  42. // https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
  43. compile group: 'org.apache.commons', name: 'commons-lang3', version: COMMONS_LANG_VERSION
  44. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  45. // 校验器
  46. // https://mvnrepository.com/artifact/org.hibernate.validator/hibernate-validator
  47. compile group: 'org.hibernate.validator', name: 'hibernate-validator', version: VALIDATOR_VERSION
  48. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  49. // spring boot 依赖
  50. compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: SPRING_BOOT_VERSION
  51. compile group: 'org.springframework.boot', name: 'spring-boot-starter-logging', version: SPRING_BOOT_VERSION
  52. compile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: SPRING_BOOT_VERSION
  53. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  54. // RESTful API 文档生成工具
  55. // https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui
  56. compile group: 'io.springfox', name: 'springfox-swagger-ui', version: SWAGGER_VERSION
  57. compile group: 'io.springfox', name: 'springfox-swagger2', version: SWAGGER_VERSION
  58. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  59. // 二维码与条形码
  60. // https://mvnrepository.com/artifact/com.google.zxing/core
  61. compile group: 'com.google.zxing', name: 'core', version: ZXING_VERSION
  62. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  63. // Sybotan 依赖
  64. compile group: 'cn.sagacloud', name: 'saga-kotlin-base', version: SAGA_KOTLIN_VERSION
  65. compile group: 'cn.sagacloud', name: 'saga-kotlin-database', version: SAGA_KOTLIN_VERSION
  66. compile project(':saga-service-models')
  67. }
  68. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  69. // 文档生成
  70. dokka {
  71. jdkVersion = JDK_VERSION
  72. outputFormat = 'javadoc'
  73. outputDirectory = '$buildDir/javadoc'
  74. //sourceDirs = files('src/main/kotlin')
  75. }
  76. // 上成上传的文档jar包
  77. task javadocJar(type: Jar, dependsOn: dokka) {
  78. classifier = 'javadoc'
  79. from dokka.outputDirectory
  80. }
  81. // 上成上传的文档jar包
  82. task sourcesJar(type: Jar) {
  83. classifier = 'sources'
  84. from sourceSets.main.allSource
  85. }
  86. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  87. // maven 仓库管理
  88. // 设置上传的包,默认上传aar与pom
  89. artifacts {
  90. //archives javadocJar
  91. //archives sourcesJar
  92. }
  93. uploadArchives {
  94. repositories {
  95. mavenDeployer {
  96. pom.groupId = project.group
  97. pom.version = project.version
  98. pom.artifactId = project.name
  99. pom.project {
  100. name project.name
  101. packaging 'jar'
  102. url SAGA_URL
  103. description '斯伯坦机器人世界 网站项目核心支持库。'
  104. licenses {
  105. license {
  106. name LICENSE_NAME
  107. url LICENSE_URL
  108. }
  109. }
  110. developers {
  111. developer {
  112. id DEVELOPER_ID
  113. name DEVELOPER_NAME
  114. }
  115. }
  116. }
  117. snapshotRepository(url: MAVEN_REPO_SNAPSHOT_URL) {
  118. authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
  119. }
  120. repository(url: MAVEN_REPO_RELEASE_URL) {
  121. authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
  122. }
  123. }
  124. }
  125. }