forked from getsentry/sentry-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
69 lines (59 loc) · 1.84 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
69 lines (59 loc) · 1.84 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
import net.ltgt.gradle.errorprone.errorprone
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
`java-library`
kotlin("jvm")
id("io.sentry.javadoc")
alias(libs.plugins.errorprone)
alias(libs.plugins.gradle.versions)
alias(libs.plugins.buildconfig)
id("io.sentry.animalsniffer")
}
tasks.withType<KotlinCompile>().configureEach {
compilerOptions.jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8
}
kotlin { explicitApi() }
dependencies {
api(projects.sentry)
implementation(libs.async.profiler)
implementation(libs.async.profiler.jfr.converter)
compileOnly(libs.jetbrains.annotations)
compileOnly(libs.nopen.annotations)
errorprone(libs.errorprone.core)
errorprone(libs.nopen.checker)
errorprone(libs.nullaway)
// tests
testImplementation(kotlin(Config.kotlinStdLib))
testImplementation(projects.sentryTestSupport)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.mockito.kotlin)
testImplementation(libs.mockito.inline)
}
tasks.withType<JavaCompile>().configureEach {
options.errorprone {
check("NullAway", net.ltgt.gradle.errorprone.CheckSeverity.ERROR)
option("NullAway:AnnotatedPackages", "io.sentry")
}
}
buildConfig {
useJavaOutput()
packageName("io.sentry.asyncprofiler")
buildConfigField(
"String",
"SENTRY_ASYNC_PROFILER_SDK_NAME",
"\"${Config.Sentry.SENTRY_ASYNC_PROFILER_SDK_NAME}\"",
)
buildConfigField("String", "VERSION_NAME", "\"${project.version}\"")
}
tasks.jar {
manifest {
attributes(
"Sentry-Version-Name" to project.version,
"Sentry-SDK-Name" to Config.Sentry.SENTRY_ASYNC_PROFILER_SDK_NAME,
"Sentry-SDK-Package-Name" to "maven:io.sentry:sentry-async-profiler",
"Implementation-Vendor" to "Sentry",
"Implementation-Title" to project.name,
"Implementation-Version" to project.version,
)
}
}