-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
125 lines (109 loc) · 3.99 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
plugins {
id 'org.springframework.boot' version '2.6.6'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.asciidoctor.convert' version '1.5.8'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'org.owasp.dependencycheck' version '7.0.3'
id "org.checkerframework" version "0.6.14"
id 'checkstyle'
id 'java'
}
group = 'io.github.almogtavor'
version = '1.1.1'
repositories {
mavenCentral()
}
ext {
set('snippetsDir', file("build/generated-snippets"))
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-web") {
exclude group: "org.springframework.boot", module: "spring-boot-starter-tomcat"
}
implementation "org.springframework.boot:spring-boot-starter-webflux"
implementation 'com.google.code.gson:gson'
implementation 'org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-depchain:3.1.4'
implementation 'org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:3.1.4'
implementation 'org.springdoc:springdoc-openapi-ui:1.6.9'
implementation 'org.springdoc:springdoc-openapi-webflux-core:1.6.9'
implementation 'org.springdoc:springdoc-openapi-webflux-ui:1.6.9'
implementation 'com.squareup.tools.build:maven-archeologist:0.0.3.1'
implementation 'org.apache.maven.resolver:maven-resolver:1.8.0'
implementation("org.apache.maven.resolver:maven-resolver-impl") {
version {
strictly "1.8.0"
}
}
implementation("org.apache.maven.resolver:maven-resolver-transport-wagon") {
version {
strictly "1.8.0"
}
}
implementation("org.apache.maven.resolver:maven-resolver-connector-basic") {
version {
strictly "1.8.0"
}
}
implementation 'org.apache.maven.resolver:maven-resolver-transport-http:1.8.0'
implementation 'org.codehaus.plexus:plexus-utils:3.4.2'
implementation 'org.eclipse.sisu:sisu-plexus:0.3.5'
implementation 'org.eclipse.sisu:org.eclipse.sisu.plexus:0.3.5'
implementation 'org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api-maven:3.1.4'
implementation 'com.google.inject:guice:5.1.0'
implementation 'io.vavr:vavr:0.10.4'
implementation 'org.jsoup:jsoup:1.15.2'
implementation 'org.apache.maven.indexer:indexer-core:6.2.2'
implementation 'org.apache.maven.indexer:maven-indexer:6.2.2'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
compileOnly 'org.checkerframework:checker-qual:3.4.0'
testCompileOnly 'org.checkerframework:checker-qual:3.4.0'
checkerFramework 'org.checkerframework:checker:3.4.0'
}
tasks.named('test') {
outputs.dir snippetsDir
useJUnitPlatform()
}
tasks.named('asciidoctor') {
inputs.dir snippetsDir
dependsOn test
}
checkstyle {
configFile = new File(rootDir, "checkstyle/checkstyle.xml")
}
tasks.withType(Checkstyle) {
reports {
html.destination rootProject.file("build/reports/checkstyle.html")
}
}
configure(checkstyleMain) {
group = 'Verification'
description = 'Run checkstyle on all main Java sources'
}
configure(checkstyleTest) {
group = 'Verification'
description = 'Run checkstyle on all test Java sources'
}
test.dependsOn('checkstyleMain', 'checkstyleTest')
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
bootJar {
archiveVersion = ""
}
var imageName = "almogtavor/" + project.name
var imageNameWithVersion = "${imageName}:${version}"
tasks.register('dockerBuildAndPush') {
group = 'build'
doLast {
exec {
commandLine("docker", "build", "-f", "Dockerfile.gradleless", "-t", imageNameWithVersion, ".")
}
exec {
commandLine("docker", "push", "${imageNameWithVersion}")
}
}
}
dockerBuildAndPush.dependsOn("bootJar")