sybotan 4 anni fa
parent
commit
d47f69f90a
3 ha cambiato i file con 44 aggiunte e 12 eliminazioni
  1. 39 10
      build.gradle
  2. 2 0
      gradle.properties
  3. 3 2
      gradle/wrapper/gradle-wrapper.properties

+ 39 - 10
build.gradle

@@ -24,6 +24,8 @@
 group 'cn.sagacloud'
 version SAGA_SERVICE_VERSION
 
+apply plugin: 'org.hidetake.ssh'
+
 buildscript {
     repositories {
         maven{ url "http://maven.aliyun.com/nexus/content/groups/public/"}
@@ -34,6 +36,7 @@ buildscript {
         classpath group: 'org.springframework.boot', name: 'spring-boot-gradle-plugin', version: SPRING_BOOT_VERSION
         classpath group: 'org.jetbrains.kotlin', name: 'kotlin-gradle-plugin', version: KOTLIN_VERSION
         classpath group: 'org.jetbrains.dokka', name: 'dokka-gradle-plugin', version: DOKKA_VERSION
+        classpath group: 'org.hidetake', name: 'gradle-ssh-plugin', version: GRADLE_SSH_VERSION
     }
 }
 
@@ -53,22 +56,48 @@ allprojects {
     }
 }
 
-task SybotanDokka(type: org.jetbrains.dokka.gradle.DokkaTask) {
+task dokkaAll(type: org.jetbrains.dokka.gradle.DokkaTask) {
     jdkVersion = 8
     outputFormat = "javadoc"
-    outputDirectory = "$buildDir/javadoc"
+    outputDirectory = "$buildDir/javadoc/service"
     sourceDirs = files(
-            "$projectDir/../sybotan-kotlin/sybotan-kotlin-base/src/main/kotlin",
-            "$projectDir/../sybotan-kotlin/sybotan-kotlin-excel/src/main/kotlin",
-            "$projectDir/../sybotan-kotlin/sybotan-kotlin-database/src/main/kotlin",
-            "$projectDir/../sybotan-kotlin/sybotan-kotlin-mybatis/src/main/kotlin",
-            "$projectDir/../sybotan-kotlin/sybotan-kotlin-postgresql/src/main/kotlin",
-            "sybotan-service-base/src/main/kotlin",
-            "sybotan-service-models/src/main/kotlin",
-            "sybotan-service-mybatis/src/main/kotlin"
+            "$projectDir/../saga-kotlin/saga-kotlin-base/src/main/kotlin",
+            "$projectDir/../saga-kotlin/saga-kotlin-database/src/main/kotlin",
+            "$projectDir/../saga-kotlin/saga-kotlin-mybatis/src/main/kotlin",
+            "$projectDir/../saga-kotlin/saga-kotlin-mysql/src/main/kotlin",
+            "$projectDir/../saga-kotlin/saga-kotlin-postgresql/src/main/kotlin",
+            "saga-service-base/src/main/kotlin",
+            "saga-service-kafka/src/main/kotlin",
+            "saga-service-models/src/main/kotlin",
+            "saga-service-mybatis/src/main/kotlin",
+            "saga-service-postgresql/src/main/kotlin"
     )
 }
 
 task clean(type: Delete) {
     delete rootProject.buildDir
+}
+
+//////////////////////////////////////////////////////
+// ssh 部署文档
+ssh.settings {
+    knownHosts = allowAnyHosts
+}
+
+remotes {
+    docserver {
+        host = "47.94.89.44"
+        port = 22
+        user = "user1"
+        password = "@)!^sagacloud"
+    }
+}
+
+task deployDoc {
+    ssh.run {
+        session(remotes.docserver) {
+            // Deploy doc
+            put from: "$buildDir/javadoc/service", into: '/opt/tomcat9/webapps/api/server'
+        }
+    }
 }

+ 2 - 0
gradle.properties

@@ -44,6 +44,8 @@ JDK_VERSION = 8
 COMMONS_LANG_VERSION = 3.9
 # https://mvnrepository.com/artifact/org.jetbrains.dokka/dokka-gradle-plugin
 DOKKA_VERSION = 0.9.16
+# https://mvnrepository.com/artifact/org.hidetake/gradle-ssh-plugin
+GRADLE_SSH_VERSION = 2.10.1
 # https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib-jdk8
 KOTLIN_VERSION = 1.3.61
 # https://mvnrepository.com/artifact/org.apache.shiro/shiro-spring-boot-web-starter

+ 3 - 2
gradle/wrapper/gradle-wrapper.properties

@@ -1,5 +1,6 @@
+#Tue Apr 21 09:55:18 CST 2020
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
-zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME