-
-
Notifications
You must be signed in to change notification settings - Fork 468
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
154 lines (139 loc) · 5.38 KB
/
build.gradle.kts
File metadata and controls
154 lines (139 loc) · 5.38 KB
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
154
import net.ltgt.gradle.errorprone.errorprone
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
`java-library`
id("io.sentry.javadoc")
alias(libs.plugins.kotlin.jvm)
jacoco
alias(libs.plugins.errorprone)
alias(libs.plugins.gradle.versions)
alias(libs.plugins.buildconfig)
alias(libs.plugins.springboot3) apply false
}
configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.withType<KotlinCompile>().configureEach {
compilerOptions.jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
compilerOptions.languageVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_9
compilerOptions.apiVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_9
}
dependencies {
constraints {
testImplementation(libs.okhttp) { version { strictly(libs.versions.okhttp.get()) } }
testImplementation(libs.okhttp.mockwebserver) {
version { strictly(libs.versions.okhttp.get()) }
}
}
api(projects.sentry)
api(projects.sentrySpringJakarta)
compileOnly(projects.sentryLogback)
compileOnly(projects.sentryApacheHttpClient5)
compileOnly(platform(SpringBootPlugin.BOM_COORDINATES))
compileOnly(projects.sentryGraphql)
compileOnly(projects.sentryGraphql22)
compileOnly(projects.sentryQuartz)
compileOnly(libs.spring.kafka3)
compileOnly(Config.Libs.springWeb)
compileOnly(Config.Libs.springWebflux)
compileOnly(libs.context.propagation)
compileOnly(libs.jetbrains.annotations)
compileOnly(libs.nopen.annotations)
compileOnly(libs.otel)
compileOnly(libs.reactor.core)
compileOnly(libs.servlet.jakarta.api)
compileOnly(libs.springboot3.starter)
compileOnly(libs.springboot3.starter.aop)
compileOnly(libs.springboot3.starter.graphql)
compileOnly(libs.springboot3.starter.quartz)
compileOnly(libs.springboot3.starter.security)
compileOnly(projects.sentryOpentelemetry.sentryOpentelemetryCore)
compileOnly(projects.sentryOpentelemetry.sentryOpentelemetryAgentcustomization)
api(projects.sentryReactor)
annotationProcessor(platform(SpringBootPlugin.BOM_COORDINATES))
annotationProcessor(Config.AnnotationProcessors.springBootAutoConfigure)
annotationProcessor(Config.AnnotationProcessors.springBootConfiguration)
errorprone(libs.errorprone.core)
errorprone(libs.nopen.checker)
errorprone(libs.nullaway)
// tests
testImplementation(projects.sentryLogback)
testImplementation(projects.sentryApacheHttpClient5)
testImplementation(projects.sentryGraphql)
testImplementation(projects.sentryGraphql22)
testImplementation(projects.sentryOpentelemetry.sentryOpentelemetryCore)
testImplementation(projects.sentryOpentelemetry.sentryOpentelemetryAgent)
testImplementation(projects.sentryOpentelemetry.sentryOpentelemetryAgentcustomization)
testImplementation(projects.sentryOpentelemetry.sentryOpentelemetryBootstrap)
testImplementation(projects.sentryQuartz)
testImplementation(projects.sentryReactor)
testImplementation(projects.sentryTestSupport)
testImplementation(kotlin(Config.kotlinStdLib))
testImplementation(platform(SpringBootPlugin.BOM_COORDINATES))
testImplementation(libs.context.propagation)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.mockito.kotlin)
testImplementation(libs.okhttp)
testImplementation(libs.okhttp.mockwebserver)
testImplementation(libs.otel)
testImplementation(libs.otel.extension.autoconfigure.spi)
testImplementation(libs.springboot3.otel)
testImplementation(libs.springboot3.starter)
testImplementation(libs.springboot3.starter.aop)
testImplementation(libs.springboot3.starter.graphql)
testImplementation(libs.spring.kafka3)
testImplementation(libs.springboot3.starter.quartz)
testImplementation(libs.springboot3.starter.security)
testImplementation(libs.springboot3.starter.test)
testImplementation(libs.springboot3.starter.web)
testImplementation(libs.springboot3.starter.webflux)
testImplementation(projects.sentryAsyncProfiler)
}
configure<SourceSetContainer> { test { java.srcDir("src/test/java") } }
jacoco { toolVersion = libs.versions.jacoco.get() }
tasks.jacocoTestReport {
reports {
xml.required.set(true)
html.required.set(false)
}
}
tasks {
jacocoTestCoverageVerification {
violationRules { rule { limit { minimum = Config.QualityPlugins.Jacoco.minimumCoverage } } }
}
check {
dependsOn(jacocoTestCoverageVerification)
dependsOn(jacocoTestReport)
}
}
buildConfig {
useJavaOutput()
packageName("io.sentry.spring.boot.jakarta")
buildConfigField(
"String",
"SENTRY_SPRING_BOOT_JAKARTA_SDK_NAME",
"\"${Config.Sentry.SENTRY_SPRING_BOOT_JAKARTA_SDK_NAME}\"",
)
buildConfigField("String", "VERSION_NAME", "\"${project.version}\"")
}
tasks.withType<JavaCompile>().configureEach {
dependsOn(tasks.generateBuildConfig)
options.errorprone {
check("NullAway", net.ltgt.gradle.errorprone.CheckSeverity.ERROR)
option("NullAway:AnnotatedPackages", "io.sentry")
}
}
tasks.jar {
manifest {
attributes(
"Sentry-Version-Name" to project.version,
"Sentry-SDK-Name" to Config.Sentry.SENTRY_SPRING_BOOT_JAKARTA_SDK_NAME,
"Sentry-SDK-Package-Name" to "maven:io.sentry:sentry-spring-boot-jakarta",
"Implementation-Vendor" to "Sentry",
"Implementation-Title" to project.name,
"Implementation-Version" to project.version,
)
}
}