-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.gradle
135 lines (113 loc) · 3.84 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
plugins {
id("com.github.johnrengelman.shadow") version "8.1.1"
id("io.micronaut.application") version "4.4.4"
id("jacoco")
id("org.sonarqube") version "6.0.1.5171"
id("pl.allegro.tech.build.axion-release") version "1.18.16"
id("checkstyle")
}
version = scmVersion.version
group = "com.michelin.ns4kafka"
repositories {
mavenCentral()
maven {
url "https://packages.confluent.io/maven"
}
}
dependencies {
annotationProcessor("org.projectlombok:lombok")
annotationProcessor("io.micronaut:micronaut-http-validation")
annotationProcessor("io.micronaut.openapi:micronaut-openapi")
annotationProcessor("io.micronaut.security:micronaut-security-annotations")
annotationProcessor("io.micronaut.validation:micronaut-validation-processor")
implementation("io.micronaut:micronaut-http-client")
implementation("io.micronaut:micronaut-jackson-databind")
implementation("io.micronaut.kafka:micronaut-kafka")
implementation("io.micronaut:micronaut-management")
implementation("io.micronaut.validation:micronaut-validation")
implementation("io.micronaut.reactor:micronaut-reactor")
implementation("io.micronaut.security:micronaut-security")
implementation("io.micronaut.security:micronaut-security-jwt")
implementation("io.micronaut.security:micronaut-security-ldap")
implementation("io.micronaut.openapi:micronaut-openapi")
implementation("io.swagger.core.v3:swagger-annotations")
implementation("jakarta.annotation:jakarta.annotation-api")
implementation("jakarta.validation:jakarta.validation-api")
implementation('io.confluent:kafka-schema-registry-client:7.8.0')
compileOnly("org.projectlombok:lombok")
compileOnly("com.google.code.findbugs:jsr305") // https://github.com/micronaut-projects/micronaut-core/pull/5691
runtimeOnly("ch.qos.logback:logback-classic")
testImplementation("org.mockito:mockito-core")
testImplementation("org.testcontainers:junit-jupiter:1.20.4")
testImplementation("org.testcontainers:testcontainers:1.20.4")
testImplementation("org.testcontainers:kafka:1.20.4")
testImplementation("org.mockito:mockito-junit-jupiter:5.15.2")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.11.4")
testImplementation("io.projectreactor:reactor-test")
testAnnotationProcessor("org.projectlombok:lombok")
testCompileOnly("org.projectlombok:lombok")
}
application {
mainClass.set("com.michelin.ns4kafka.Application")
}
java {
sourceCompatibility = JavaVersion.toVersion('21')
targetCompatibility = JavaVersion.toVersion('21')
}
run {
// environment("MICRONAUT_ENVIRONMENTS", "dev")
}
micronaut {
runtime("netty")
testRuntime("junit5")
processing {
incremental(true)
annotations("com.michelin.ns4kafka.*")
}
}
shadowJar {
archiveClassifier.set('')
dependsOn(distTar, distZip)
}
dockerfile {
baseImage = "eclipse-temurin:21-jre-alpine"
}
if (project.hasProperty("releaseLatest")) {
dockerBuild {
images.set(["michelin/ns4kafka:" + version, "michelin/ns4kafka:latest"])
}
} else {
dockerBuild {
images.set(["michelin/ns4kafka:" + version])
}
}
tasks.withType(JavaCompile).configureEach {
options.fork = true
options.forkOptions.jvmArgs << '-Dmicronaut.openapi.views.spec=rapidoc.enabled=true'
}
sonarqube {
properties {
property "sonar.projectKey", "michelin_ns4kafka"
property "sonar.organization", "michelin"
property "sonar.host.url", "https://sonarcloud.io"
}
}
jacocoTestReport {
dependsOn test
reports {
html.required = true
xml.required = true
}
}
test {
reports {
html.required = false
}
}
checkstyle {
toolVersion = '10.12.3'
configFile = file(".checkstyle/checkstyle.xml")
ignoreFailures = false
maxErrors = 0
maxWarnings = 0
}