|
1 | 1 | plugins { |
2 | | - id("otel.java-conventions") |
3 | | - id("otel.publish-conventions") |
| 2 | + id("otel.java-conventions") |
| 3 | + id("otel.publish-conventions") |
4 | 4 | } |
5 | 5 |
|
6 | 6 | description = "OpenTelemetry Prometheus Exporter" |
7 | 7 | otelJava.moduleName.set("io.opentelemetry.exporter.prometheus") |
8 | 8 |
|
9 | 9 | dependencies { |
10 | | - api(project(":sdk:metrics")) |
11 | | - |
12 | | - compileOnly(project(":api:incubator")) |
13 | | - implementation(project(":exporters:common")) |
14 | | - implementation(project(":sdk-extensions:autoconfigure-spi")) |
15 | | - implementation("io.prometheus:prometheus-metrics-exporter-httpserver") { |
16 | | - exclude(group = "io.prometheus", module = "prometheus-metrics-exposition-formats") |
17 | | - } |
18 | | - implementation("io.prometheus:prometheus-metrics-exposition-formats-no-protobuf") |
19 | | - |
20 | | - compileOnly("com.google.auto.value:auto-value-annotations") |
21 | | - |
22 | | - annotationProcessor("com.google.auto.value:auto-value") |
23 | | - |
24 | | - testImplementation(project(":sdk:testing")) |
25 | | - testImplementation("io.opentelemetry.proto:opentelemetry-proto") |
26 | | - testImplementation("com.sun.net.httpserver:http") |
27 | | - testImplementation("com.google.guava:guava") |
28 | | - testImplementation("com.linecorp.armeria:armeria") |
29 | | - testImplementation("com.linecorp.armeria:armeria-junit5") |
30 | | - testImplementation("com.linecorp.armeria:armeria-grpc-protocol") |
31 | | - testImplementation("com.fasterxml.jackson.jr:jackson-jr-stree") |
32 | | - testImplementation("com.fasterxml.jackson.jr:jackson-jr-objects") |
33 | | - testImplementation("org.testcontainers:junit-jupiter") |
| 10 | + api(project(":sdk:metrics")) |
| 11 | + |
| 12 | + compileOnly(project(":api:incubator")) |
| 13 | + implementation(project(":exporters:common")) |
| 14 | + implementation(project(":sdk-extensions:autoconfigure-spi")) |
| 15 | + implementation("io.prometheus:prometheus-metrics-exporter-httpserver") { |
| 16 | + exclude(group = "io.prometheus", module = "prometheus-metrics-exposition-formats") |
| 17 | + } |
| 18 | + implementation("io.prometheus:prometheus-metrics-exposition-formats-no-protobuf") |
| 19 | + |
| 20 | + compileOnly("com.google.auto.value:auto-value-annotations") |
| 21 | + |
| 22 | + annotationProcessor("com.google.auto.value:auto-value") |
| 23 | + |
| 24 | + testImplementation(project(":sdk:testing")) |
| 25 | + testImplementation("io.opentelemetry.proto:opentelemetry-proto") |
| 26 | + testImplementation("com.sun.net.httpserver:http") |
| 27 | + testImplementation("com.google.guava:guava") |
| 28 | + testImplementation("com.linecorp.armeria:armeria") |
| 29 | + testImplementation("com.linecorp.armeria:armeria-junit5") |
| 30 | + testImplementation("com.linecorp.armeria:armeria-grpc-protocol") |
| 31 | + testImplementation("com.fasterxml.jackson.jr:jackson-jr-stree") |
| 32 | + testImplementation("com.fasterxml.jackson.jr:jackson-jr-objects") |
| 33 | + testImplementation("org.testcontainers:junit-jupiter") |
34 | 34 | } |
35 | 35 |
|
36 | 36 | tasks { |
37 | | - check { |
38 | | - dependsOn(testing.suites) |
39 | | - } |
| 37 | + check { |
| 38 | + dependsOn(testing.suites) |
| 39 | + } |
40 | 40 | } |
41 | 41 |
|
42 | 42 | // TODO(anuraaga): Move to conventions. |
43 | 43 |
|
44 | 44 | testing { |
45 | | - suites { |
46 | | - register<JvmTestSuite>("testJpms") { |
47 | | - targets { |
48 | | - all { |
49 | | - testTask.configure { |
50 | | - enabled = gradle.startParameter.projectProperties.get("testJavaVersion") != "8" |
51 | | - } |
52 | | - } |
53 | | - } |
| 45 | + suites { |
| 46 | + register<JvmTestSuite>("testJpms") { |
| 47 | + targets { |
| 48 | + all { |
| 49 | + testTask.configure { |
| 50 | + enabled = gradle.startParameter.projectProperties.get("testJavaVersion") != "8" |
| 51 | + } |
54 | 52 | } |
| 53 | + } |
55 | 54 | } |
| 55 | + } |
56 | 56 | } |
57 | 57 |
|
58 | 58 | sourceSets { |
59 | | - val module by creating |
60 | | - main { |
61 | | - output.dir(mapOf("builtBy" to "compileModuleJava"), module.java.destinationDirectory) |
62 | | - } |
| 59 | + val module by creating |
| 60 | + main { |
| 61 | + output.dir(mapOf("builtBy" to "compileModuleJava"), module.java.destinationDirectory) |
| 62 | + } |
63 | 63 | } |
64 | 64 |
|
65 | 65 | configurations { |
66 | | - named("moduleImplementation") { |
67 | | - extendsFrom(configurations["implementation"]) |
68 | | - } |
| 66 | + named("moduleImplementation") { |
| 67 | + extendsFrom(configurations["implementation"]) |
| 68 | + } |
69 | 69 | } |
70 | 70 |
|
71 | 71 | tasks { |
72 | | - jar { |
73 | | - manifest.attributes.remove("Automatic-Module-Name") |
| 72 | + jar { |
| 73 | + manifest.attributes.remove("Automatic-Module-Name") |
74 | 74 |
|
75 | | - exclude("**/HackForJpms.class") |
76 | | - } |
| 75 | + exclude("**/HackForJpms.class") |
| 76 | + } |
77 | 77 |
|
78 | | - compileJava { |
79 | | - exclude("module-info.java") |
80 | | - } |
| 78 | + compileJava { |
| 79 | + exclude("module-info.java") |
| 80 | + } |
81 | 81 |
|
82 | | - withType<Checkstyle>().configureEach { |
83 | | - exclude("module-info.java") |
84 | | - } |
| 82 | + withType<Checkstyle>().configureEach { |
| 83 | + exclude("module-info.java") |
| 84 | + } |
85 | 85 |
|
86 | | - named<JavaCompile>("compileModuleJava") { |
87 | | - with(options) { |
88 | | - release.set(9) |
89 | | - } |
| 86 | + named<JavaCompile>("compileModuleJava") { |
| 87 | + with(options) { |
| 88 | + release.set(9) |
90 | 89 | } |
| 90 | + } |
91 | 91 |
|
92 | | - named<JavaCompile>("compileTestJpmsJava") { |
93 | | - with(options) { |
94 | | - release.set(9) |
95 | | - compilerArgs.add("--add-modules=org.junit.jupiter.api") |
96 | | - compilerArgs.add("--add-reads=io.opentelemetry.exporters.prometheus.test=org.junit.jupiter.api") |
97 | | - } |
| 92 | + named<JavaCompile>("compileTestJpmsJava") { |
| 93 | + with(options) { |
| 94 | + release.set(9) |
| 95 | + compilerArgs.add("--add-modules=org.junit.jupiter.api") |
| 96 | + compilerArgs.add("--add-reads=io.opentelemetry.exporters.prometheus.test=org.junit.jupiter.api") |
98 | 97 | } |
| 98 | + } |
99 | 99 | } |
0 commit comments