|
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-textformats") |
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("io.prometheus:prometheus-metrics-exposition-formats-no-protobuf") |
27 | | - testImplementation("com.sun.net.httpserver:http") |
28 | | - testImplementation("com.google.guava:guava") |
29 | | - testImplementation("com.linecorp.armeria:armeria") |
30 | | - testImplementation("com.linecorp.armeria:armeria-junit5") |
31 | | - testImplementation("com.linecorp.armeria:armeria-grpc-protocol") |
32 | | - testImplementation("com.fasterxml.jackson.jr:jackson-jr-stree") |
33 | | - testImplementation("com.fasterxml.jackson.jr:jackson-jr-objects") |
34 | | - 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") |
35 | 34 | } |
36 | 35 |
|
37 | 36 | tasks { |
38 | | - check { |
39 | | - dependsOn(testing.suites) |
40 | | - } |
| 37 | + check { |
| 38 | + dependsOn(testing.suites) |
| 39 | + } |
41 | 40 | } |
42 | 41 |
|
43 | 42 | // TODO(anuraaga): Move to conventions. |
44 | 43 |
|
45 | 44 | testing { |
46 | | - suites { |
47 | | - register<JvmTestSuite>("testJpms") { |
48 | | - targets { |
49 | | - all { |
50 | | - testTask.configure { |
51 | | - enabled = gradle.startParameter.projectProperties.get("testJavaVersion") != "8" |
52 | | - } |
| 45 | + suites { |
| 46 | + register<JvmTestSuite>("testJpms") { |
| 47 | + targets { |
| 48 | + all { |
| 49 | + testTask.configure { |
| 50 | + enabled = gradle.startParameter.projectProperties.get("testJavaVersion") != "8" |
| 51 | + } |
| 52 | + } |
| 53 | + } |
53 | 54 | } |
54 | | - } |
55 | 55 | } |
56 | | - } |
57 | 56 | } |
58 | 57 |
|
59 | 58 | sourceSets { |
60 | | - val module by creating |
61 | | - main { |
62 | | - output.dir(mapOf("builtBy" to "compileModuleJava"), module.java.destinationDirectory) |
63 | | - } |
| 59 | + val module by creating |
| 60 | + main { |
| 61 | + output.dir(mapOf("builtBy" to "compileModuleJava"), module.java.destinationDirectory) |
| 62 | + } |
64 | 63 | } |
65 | 64 |
|
66 | 65 | configurations { |
67 | | - named("moduleImplementation") { |
68 | | - extendsFrom(configurations["implementation"]) |
69 | | - } |
| 66 | + named("moduleImplementation") { |
| 67 | + extendsFrom(configurations["implementation"]) |
| 68 | + } |
70 | 69 | } |
71 | 70 |
|
72 | 71 | tasks { |
73 | | - jar { |
74 | | - manifest.attributes.remove("Automatic-Module-Name") |
| 72 | + jar { |
| 73 | + manifest.attributes.remove("Automatic-Module-Name") |
75 | 74 |
|
76 | | - exclude("**/HackForJpms.class") |
77 | | - } |
| 75 | + exclude("**/HackForJpms.class") |
| 76 | + } |
78 | 77 |
|
79 | | - compileJava { |
80 | | - exclude("module-info.java") |
81 | | - } |
| 78 | + compileJava { |
| 79 | + exclude("module-info.java") |
| 80 | + } |
82 | 81 |
|
83 | | - withType<Checkstyle>().configureEach { |
84 | | - exclude("module-info.java") |
85 | | - } |
| 82 | + withType<Checkstyle>().configureEach { |
| 83 | + exclude("module-info.java") |
| 84 | + } |
86 | 85 |
|
87 | | - named<JavaCompile>("compileModuleJava") { |
88 | | - with(options) { |
89 | | - release.set(9) |
| 86 | + named<JavaCompile>("compileModuleJava") { |
| 87 | + with(options) { |
| 88 | + release.set(9) |
| 89 | + } |
90 | 90 | } |
91 | | - } |
92 | 91 |
|
93 | | - named<JavaCompile>("compileTestJpmsJava") { |
94 | | - with(options) { |
95 | | - release.set(9) |
96 | | - compilerArgs.add("--add-modules=org.junit.jupiter.api") |
97 | | - compilerArgs.add("--add-reads=io.opentelemetry.exporters.prometheus.test=org.junit.jupiter.api") |
| 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 | + } |
98 | 98 | } |
99 | | - } |
100 | 99 | } |
0 commit comments