-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
153 lines (124 loc) · 4.47 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
import org.asciidoctor.gradle.base.SafeMode
plugins {
id 'org.asciidoctor.jvm.convert' version '3.3.2'
id 'org.springframework.boot' version '2.6.1'
id 'org.jetbrains.kotlin.jvm' version '1.6.10'
id 'org.jetbrains.kotlin.plugin.spring' version '1.6.10'
id 'com.adarshr.test-logger' version '1.2.0'
id 'org.kordamp.gradle.livereload' version '0.2.1'
id 'org.jlleitschuh.gradle.ktlint' version '10.2.0'
id 'com.epages.restdocs-api-spec' version '0.16.4'
}
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.kordamp.gradle.livereload'
group = 'com.boclips'
version = '1'
sourceCompatibility = '17'
repositories {
mavenCentral()
maven {
url 'https://jitpack.io'
credentials { username authToken }
}
}
ext {
set('snippetsDir', file('build/generated-snippets'))
junitVersion = '5.3.1'
kotlinVersion = '1.6.10'
feignVersion = '11.7'
}
test {
useJUnitPlatform()
}
configurations {
asciidoctorExt
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-hateoas")
implementation "org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}"
implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}"
implementation 'com.github.kittinunf.fuel:fuel:2.2.1'
implementation 'com.github.kittinunf.fuel:fuel-jackson:2.2.1'
implementation 'com.github.kittinunf.fuel:fuel-coroutines:2.2.1'
implementation 'org.imsglobal:basiclti-util:1.1.2'
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.restdocs:spring-restdocs-restassured'
testImplementation 'com.epages:restdocs-api-spec:0.16.4'
testImplementation 'com.epages:restdocs-api-spec-restassured:0.16.4'
testImplementation 'com.github.boclips:videos:v1255'
// Below are transitive client dependencies that we need to import ourselves at the moment...
testImplementation('com.fasterxml.jackson.core:jackson-databind:2.13.1')
testImplementation('com.fasterxml.jackson.module:jackson-module-kotlin:2.13.1')
testImplementation "io.github.openfeign:feign-jackson:$feignVersion"
testImplementation "io.github.openfeign:feign-core:$feignVersion"
testImplementation "io.github.openfeign:feign-okhttp:$feignVersion"
testImplementation "io.opentracing.contrib:opentracing-spring-jaeger-cloud-starter:3.3.1"
testImplementation('org.springframework.security.oauth:spring-security-oauth2:2.4.0.RELEASE')
testImplementation('com.damnhandy:handy-uri-templates:2.1.8')
testImplementation 'org.springframework.boot:spring-boot-starter-hateoas'
testImplementation 'org.springframework.hateoas:spring-hateoas'
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testImplementation "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
}
test {
outputs.dir snippetsDir
}
asciidoctorj {
version = '2.5.2'
}
asciidoctor {
dependsOn test
configurations 'asciidoctorExt'
outputDir = file('build/asciidoc/html5')
resources {
from 'src/docs/asciidoc/resources'
into 'resources'
}
baseDirFollowsSourceFile()
}
postman {
baseUrl = 'https://api.boclips.com'
title = 'Boclips API'
outputDirectory = "${buildDir}/postman"
}
task copyRestDocs(type: Copy) {
dependsOn asciidoctor
from "${asciidoctor.outputDir}"
into "${sourceSets.main.output.resourcesDir}/static/docs"
}
task copyPostmanCollections(type: Copy) {
dependsOn 'postman'
from "${postman.outputDirectory}"
into "${sourceSets.main.output.resourcesDir}/static/docs/postman"
}
openapi3 {
server = 'https://api.boclips.com'
title = 'Boclips API'
format = 'yaml'
}
bootJar {
dependsOn copyPostmanCollections
dependsOn copyRestDocs
}
liveReload {
port 8080
docRoot "${asciidoctor.outputDir}"
}
compileKotlin {
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict']
jvmTarget = '17'
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict']
jvmTarget = '17'
}
}