|
@@ -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'
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|