-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
88 lines (74 loc) · 3.11 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
buildscript {
repositories {
gradlePluginPortal()
mavenCentral()
}
}
plugins {
id "java-gradle-plugin"
id "maven-publish"
id "org.jetbrains.kotlin.jvm" version "2.0.20" // https://docs.gradle.org/current/userguide/compatibility.html#kotlin
id "org.jetbrains.kotlin.plugin.serialization" version "2.0.20"
id "org.jlleitschuh.gradle.ktlint" version "12.1.2"
id "dev.projektor.publish" version "9.0.0"
id "com.gradle.plugin-publish" version "1.3.0"
id "com.atkinsondev.opentelemetry-build" version "3.1.1"
}
group = "com.atkinsondev"
version = "3.1.1"
gradlePlugin {
website = 'https://github.com/craigatk/opentelemetry-gradle-plugin'
vcsUrl = 'https://github.com/craigatk/opentelemetry-gradle-plugin'
plugins {
opentelemetryPlugin {
id = 'com.atkinsondev.opentelemetry-build'
implementationClass = 'com.atkinsondev.opentelemetry.build.OpenTelemetryBuildPlugin'
displayName = 'OpenTelemetry build plugin'
description = 'Instrument your Gradle build with OpenTelemetry observability to find and eliminate build bottlenecks'
tags.addAll(['observability', 'opentelemetry', 'telemetry'])
}
}
}
repositories {
mavenCentral()
}
dependencies {
implementation "io.opentelemetry:opentelemetry-api:$otelVersion"
implementation "io.opentelemetry:opentelemetry-sdk:$otelVersion"
implementation "io.opentelemetry:opentelemetry-exporter-otlp:$otelVersion"
implementation "io.opentelemetry:opentelemetry-exporter-zipkin:$otelVersion"
implementation "io.opentelemetry:opentelemetry-semconv:$otelSemConvVersion"
testImplementation gradleTestKit()
testImplementation(platform("org.junit:junit-bom:5.11.4"))
testImplementation "org.junit.jupiter:junit-jupiter"
testImplementation "org.wiremock:wiremock:3.10.0"
testImplementation "io.strikt:strikt-core:0.35.1"
testImplementation "org.awaitility:awaitility-kotlin:4.2.2"
testImplementation "io.mockk:mockk:1.13.14"
testImplementation "org.testcontainers:testcontainers:1.20.4"
testImplementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3"
testImplementation "com.squareup.okhttp3:okhttp:4.12.0"
}
test {
useJUnitPlatform()
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}
ktlint {
disabledRules = ["no-wildcard-imports"]
}
projektor {
serverUrl = "https://projektorlive.herokuapp.com"
publishToken = System.getenv("PROJEKTOR_TOKEN") ?: project.findProperty('projektor_publish_token') ?: null
}
openTelemetryBuild {
endpoint = System.getenv("OTEL_BUILD_ENDPOINT") ?: project.findProperty('otel_build_endpoint') ?: "https://api.honeycomb.io"
headers = [
"x-honeycomb-team": System.getenv("HONEYCOMB_API_KEY") ?: project.findProperty('honeycomb_api_key') ?: "",
"x-honeycomb-dataset": "otel-gradle"
]
traceViewUrl = "https://ui.honeycomb.io/otel-gradle/environments/dev/datasets/gradle-builds/trace?trace_id={traceId}"
taskTraceEnvironmentEnabled = true
}
task printEnv(type: Exec) {
commandLine "/bin/sh", "bin/print-env.sh"
}