forked from open-telemetry/opentelemetry-java-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
31 lines (25 loc) · 964 Bytes
/
build.gradle
File metadata and controls
31 lines (25 loc) · 964 Bytes
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
plugins {
id 'java'
id 'org.springframework.boot' version '2.5.12'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'de.undercouch.download' version '4.1.1'
}
description = 'OpenTelemetry Example for Java Agent'
ext.moduleName = "io.opentelemetry.examples.javagent"
bootRun {
mainClass.set 'io.opentelemetry.example.javagent.Application'
}
bootJar {
dependsOn("downloadAgent")
}
dependencies {
implementation("io.opentelemetry:opentelemetry-api")
//spring modules
implementation("org.springframework.boot:spring-boot-starter-web")
}
// Download the OpenTelemetry java agent and put it in the build directory
task downloadAgent(type: Download) {
src "https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v${openTelemetryInstrumentationVersion}/opentelemetry-javaagent.jar"
dest project.buildDir.toString() + "/otel/opentelemetry-javaagent.jar"
overwrite true
}