-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.gradle
107 lines (92 loc) · 2.89 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local/' }
maven {
url "https://plugins.gradle.org/m2/"
}
//mavenLocal()
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
classpath 'io.github.swagger2markup:swagger2markup-gradle-plugin:1.3.1'
classpath "io.github.swagger2markup:swagger2markup:1.3.1"
classpath "io.github.swagger2markup:swagger2markup-import-files-ext:1.3.1"
classpath "com.bluepapa32:gradle-watch-plugin:0.1.5"
classpath "org.kordamp.gradle:livereload-gradle-plugin:0.2.1"
classpath "com.moowork.gradle:gradle-node-plugin:1.2.0"
}
}
apply plugin: 'org.asciidoctor.convert'
apply plugin: 'com.bluepapa32.watch'
apply plugin: 'org.kordamp.gradle.livereload'
apply plugin: 'io.github.swagger2markup'
apply plugin: 'com.moowork.node'
node {
version = '8.9.0'
download = true
}
group 'io.github.swagger2markup'
version '1.3.1'
repositories {
jcenter()
mavenCentral()
}
ext {
asciiDocDir = file("src/asciidoc")
asciiDocOutputDir = file("docs/asciidoc/swagger2markup")
}
convertSwagger2markup {
swaggerInput file("openapi/ga4gh-tool-discovery.yaml").getAbsolutePath()
outputDir asciiDocOutputDir
config = ['swagger2markup.markupLanguage' : 'ASCIIDOC',
'swagger2markup.extensions.dynamicDefinitions.contentPath' : file('docs/asciidoc/swagger2markup/definitions').absolutePath,
'swagger2markup.extensions.dynamicOverview.contentPath' : file('docs/asciidoc/swagger2markup/overview').absolutePath,
'swagger2markup.extensions.dynamicPaths.contentPath' : file('docs/asciidoc/swagger2markup/paths').absolutePath,
'swagger2markup.extensions.dynamicSecurity.contentPath' : file('docs/asciidoc/swagger2markup/security').absolutePath]
}
asciidoctorj {
version = '1.5.5'
}
asciidoctor {
dependsOn convertSwagger2markup
sourceDir asciiDocDir
outputDir file("docs")
sources {
include 'index.adoc'
}
backends = ['html5', 'pdf']
attributes = [
doctype: 'book',
toc: 'left',
toclevels: '3',
numbered: '',
sectlinks: '',
sectanchors: '',
hardbreaks: '',
generated: asciiDocOutputDir
]
}
dependencies {
// add converters and extensions using `asciidoctor` configuration
asciidoctor 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.15'
}
watch {
asciidoc {
files fileTree('docs/asciidoc')
tasks 'asciidoctor'
}
}
liveReload {
docRoot asciidoctor.outputDir.canonicalPath
}
task wrapper(type: Wrapper) {
gradleVersion = '3.5'
}
task installSwagger(type: NpmTask) {
npmCommand = ["install"]
}
task buildSwagger(type: NpmTask) {
npmCommand = ["run", "build"]
}