build.gradle 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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 'cn.sagacloud'
  24. version SAGA_SERVICE_VERSION
  25. apply plugin: 'org.hidetake.ssh'
  26. buildscript {
  27. repositories {
  28. maven{ url "http://maven.aliyun.com/nexus/content/groups/public/"}
  29. mavenCentral()
  30. jcenter()
  31. }
  32. dependencies {
  33. classpath group: 'org.springframework.boot', name: 'spring-boot-gradle-plugin', version: SPRING_BOOT_VERSION
  34. classpath group: 'org.jetbrains.kotlin', name: 'kotlin-gradle-plugin', version: KOTLIN_VERSION
  35. classpath group: 'org.jetbrains.dokka', name: 'dokka-gradle-plugin', version: DOKKA_VERSION
  36. classpath group: 'org.hidetake', name: 'gradle-ssh-plugin', version: GRADLE_SSH_VERSION
  37. }
  38. }
  39. allprojects {
  40. repositories {
  41. maven{
  42. url MAVEN_REPO_PUBLIC_URL
  43. credentials {
  44. username = NEXUS_USERNAME
  45. password = NEXUS_PASSWORD
  46. }
  47. }
  48. maven{ url "http://maven.aliyun.com/nexus/content/groups/public/"}
  49. maven { url "https://repo.spring.io/milestone" }
  50. mavenCentral()
  51. jcenter()
  52. }
  53. tasks.withType(Javadoc) {
  54. options{ encoding "UTF-8"
  55. charSet "UTF-8"
  56. links "http://docs.oracle.com/javase/8/docs/api"
  57. }
  58. }
  59. }
  60. task dokkaAll(type: org.jetbrains.dokka.gradle.DokkaTask) {
  61. jdkVersion = 8
  62. outputFormat = "javadoc"
  63. outputDirectory = "$buildDir/javadoc/service"
  64. sourceDirs = files(
  65. "$projectDir/../saga-kotlin/saga-kotlin-base/src/main/kotlin",
  66. "$projectDir/../saga-kotlin/saga-kotlin-database/src/main/kotlin",
  67. "$projectDir/../saga-kotlin/saga-kotlin-mybatis/src/main/kotlin",
  68. "$projectDir/../saga-kotlin/saga-kotlin-mysql/src/main/kotlin",
  69. "$projectDir/../saga-kotlin/saga-kotlin-postgresql/src/main/kotlin",
  70. "saga-service-base/src/main/kotlin",
  71. "saga-service-kafka/src/main/kotlin",
  72. "saga-service-models/src/main/kotlin",
  73. "saga-service-mybatis/src/main/kotlin",
  74. "saga-service-postgresql/src/main/kotlin"
  75. )
  76. }
  77. task clean(type: Delete) {
  78. delete rootProject.buildDir
  79. }
  80. //////////////////////////////////////////////////////
  81. // ssh 部署文档
  82. ssh.settings {
  83. knownHosts = allowAnyHosts
  84. }
  85. remotes {
  86. docserver {
  87. host = "47.94.89.44"
  88. port = 22
  89. user = "user1"
  90. password = "@)!^sagacloud"
  91. }
  92. }
  93. task deployDoc {
  94. ssh.run {
  95. session(remotes.docserver) {
  96. // Deploy doc
  97. // put from: "$buildDir/javadoc/service", into: '/opt/tomcat9/webapps/api/server'
  98. }
  99. }
  100. }