-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
109 lines (94 loc) · 3.68 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
/*
Integration tests derived from
https://docs.gradle.org/current/userguide/java_testing.html#sec:configuring_java_integration_tests
*/
plugins {
id 'org.springframework.boot' version '2.7.3'
id 'io.spring.dependency-management' version '1.0.13.RELEASE'
id 'org.asciidoctor.convert' version '1.5.8'
id 'java'
id 'groovy'
}
group = 'com.compilercharisma'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
integrationImplementation.extendsFrom testImplementation
integrationRuntimeOnly.extendsFrom runtimeOnly
}
repositories {
mavenCentral()
}
ext {
set('snippetsDir', file("build/generated-snippets"))
set('testcontainersVersion', "1.16.2")
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.cloud:spring-cloud-contract-wiremock:3.1.4'
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-graphql'
implementation 'org.springdoc:springdoc-openapi-webflux-ui:1.6.12'
implementation 'org.springdoc:springdoc-openapi-security:1.6.12'
implementation group: "com.twilio.sdk", name: "twilio", version: "9.1.0"
modules {
module("org.springframework.boot:spring-boot-starter-tomcat") {
replacedBy("org.springframework.boot:spring-boot-starter-reactor-netty", "Use Netty instead of Reactor Tomcat")
}
}
implementation 'org.apache.commons:commons-collections4:4.4'
implementation 'io.netty:netty-resolver-dns-native-macos:4.1.82.Final:osx-aarch_64'
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client:2.7.4'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation 'org.springframework.graphql:spring-graphql-test:1.0.2'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.testcontainers:junit-jupiter'
testImplementation 'org.spockframework:spock-core:2.2-groovy-4.0'
testImplementation group: 'org.spockframework', name: 'spock-spring', version: '2.2-groovy-4.0'
testImplementation "com.github.tomakehurst:wiremock-jre8:2.34.0"
}
dependencyManagement {
imports {
mavenBom "org.testcontainers:testcontainers-bom:${testcontainersVersion}"
}
}
tasks.withType(JavaCompile){
options.compilerArgs << "-Xlint:all"
// Add -Werror later
}
// tasks.named('foo') modifies an existing task
tasks.named('test') {
outputs.dir snippetsDir
useJUnitPlatform()
}
sourceSets {
integration {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
compileClasspath += sourceSets.test.output
runtimeClasspath += sourceSets.test.output
}
}
// integration "extends" Test
tasks.register('integration', Test){
useJUnitPlatform()
dependsOn tasks.test // run unit tests first. If they fail, this doesn't run
description = 'Runs integration tests.'
group = 'verification'
testClassesDirs = sourceSets.integration.output.classesDirs
classpath = sourceSets.integration.runtimeClasspath
}
tasks.named('asciidoctor') {
inputs.dir snippetsDir
dependsOn test
}