|
| 1 | +/* |
| 2 | + * Copyright Amazon.com, Inc. or its affiliates. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"). |
| 5 | + * You may not use this file except in compliance with the License. |
| 6 | + * A copy of the License is located at |
| 7 | + * |
| 8 | + * http://aws.amazon.com/apache2.0 |
| 9 | + * |
| 10 | + * or in the "license" file accompanying this file. This file is distributed |
| 11 | + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 12 | + * express or implied. See the License for the specific language governing |
| 13 | + * permissions and limitations under the License. |
| 14 | + */ |
| 15 | + |
1 | 16 | plugins { |
2 | | - id("java") |
3 | | - id("java-library") |
4 | | - id("maven-publish") |
| 17 | + id("java") |
| 18 | + id("java-library") |
| 19 | + id("maven-publish") |
5 | 20 | } |
6 | 21 |
|
7 | 22 | group = "software.opentelemetry.exporters.otlp.udp" |
8 | 23 | version = "1.0-SNAPSHOT" |
9 | 24 |
|
10 | 25 | repositories { |
11 | | - mavenLocal() |
12 | | - mavenCentral() |
| 26 | + mavenLocal() |
| 27 | + mavenCentral() |
13 | 28 | } |
14 | 29 |
|
15 | 30 | dependencies { |
16 | | - implementation(platform("io.opentelemetry:opentelemetry-bom:1.44.1")) |
17 | | - implementation("io.opentelemetry:opentelemetry-api") |
18 | | - implementation("io.opentelemetry:opentelemetry-sdk") |
19 | | - implementation("io.opentelemetry:opentelemetry-exporter-otlp") |
20 | | - implementation("io.opentelemetry:opentelemetry-exporter-otlp-common") |
21 | | - implementation("io.opentelemetry.proto:opentelemetry-proto:1.0.0-alpha") |
22 | | - implementation("com.google.code.findbugs:jsr305:3.0.2") |
23 | | - implementation("org.apache.logging.log4j:log4j-api:2.24.1") |
24 | | - implementation("org.apache.logging.log4j:log4j-core:2.24.1") |
25 | | - implementation("org.slf4j:slf4j-simple:2.0.16") |
26 | | - testImplementation(platform("org.junit:junit-bom:5.9.2")) |
27 | | - testImplementation("org.junit.jupiter:junit-jupiter-api") |
28 | | - testImplementation("org.junit.jupiter:junit-jupiter-engine") |
29 | | - testImplementation("org.mockito:mockito-core:5.3.1") |
30 | | - testImplementation("org.assertj:assertj-core:3.24.2") |
31 | | - testImplementation("org.mockito:mockito-junit-jupiter:5.3.1") |
| 31 | + implementation(platform("io.opentelemetry:opentelemetry-bom:1.44.1")) |
| 32 | + implementation("io.opentelemetry:opentelemetry-api") |
| 33 | + implementation("io.opentelemetry:opentelemetry-sdk") |
| 34 | + implementation("io.opentelemetry:opentelemetry-exporter-otlp") |
| 35 | + implementation("io.opentelemetry:opentelemetry-exporter-otlp-common") |
| 36 | + implementation("io.opentelemetry.proto:opentelemetry-proto:1.0.0-alpha") |
| 37 | + implementation("com.google.code.findbugs:jsr305:3.0.2") |
| 38 | + implementation("org.apache.logging.log4j:log4j-api:2.24.1") |
| 39 | + implementation("org.apache.logging.log4j:log4j-core:2.24.1") |
| 40 | + implementation("org.slf4j:slf4j-simple:2.0.16") |
| 41 | + testImplementation(platform("org.junit:junit-bom:5.9.2")) |
| 42 | + testImplementation("org.junit.jupiter:junit-jupiter-api") |
| 43 | + testImplementation("org.junit.jupiter:junit-jupiter-engine") |
| 44 | + testImplementation("org.mockito:mockito-core:5.3.1") |
| 45 | + testImplementation("org.assertj:assertj-core:3.24.2") |
| 46 | + testImplementation("org.mockito:mockito-junit-jupiter:5.3.1") |
32 | 47 | } |
33 | 48 |
|
34 | 49 | java { |
35 | | - withSourcesJar() |
36 | | - withJavadocJar() |
| 50 | + withSourcesJar() |
| 51 | + withJavadocJar() |
37 | 52 | } |
38 | 53 |
|
39 | 54 | tasks.javadoc { |
40 | | - options { |
41 | | - (this as CoreJavadocOptions).addStringOption("Xdoclint:none", "-quiet") |
42 | | - } |
43 | | - isFailOnError = false |
| 55 | + options { |
| 56 | + (this as CoreJavadocOptions).addStringOption("Xdoclint:none", "-quiet") |
| 57 | + } |
| 58 | + isFailOnError = false |
44 | 59 | } |
45 | 60 |
|
46 | 61 | sourceSets { |
47 | | - main { |
48 | | - java { |
49 | | - srcDirs("src/main/java") |
50 | | - } |
51 | | - resources { |
52 | | - srcDirs("src/main/resources") |
53 | | - } |
| 62 | + main { |
| 63 | + java { |
| 64 | + srcDirs("src/main/java") |
| 65 | + } |
| 66 | + resources { |
| 67 | + srcDirs("src/main/resources") |
54 | 68 | } |
55 | | - test { |
56 | | - java { |
57 | | - srcDirs("src/test/java") |
58 | | - } |
59 | | - resources { |
60 | | - srcDirs("src/test/resources") |
61 | | - } |
| 69 | + } |
| 70 | + test { |
| 71 | + java { |
| 72 | + srcDirs("src/test/java") |
62 | 73 | } |
| 74 | + resources { |
| 75 | + srcDirs("src/test/resources") |
| 76 | + } |
| 77 | + } |
63 | 78 | } |
64 | 79 |
|
65 | 80 | tasks.test { |
66 | | - useJUnitPlatform() |
67 | | - testLogging { |
68 | | - events("passed", "skipped", "failed") |
69 | | - } |
| 81 | + useJUnitPlatform() |
| 82 | + testLogging { |
| 83 | + events("passed", "skipped", "failed") |
| 84 | + } |
70 | 85 | } |
71 | 86 |
|
72 | 87 | tasks.jar { |
73 | | - manifest { |
74 | | - attributes( |
75 | | - "Implementation-Title" to project.name, |
76 | | - "Implementation-Version" to project.version |
77 | | - ) |
78 | | - } |
79 | | - duplicatesStrategy = DuplicatesStrategy.EXCLUDE |
| 88 | + manifest { |
| 89 | + attributes( |
| 90 | + "Implementation-Title" to project.name, |
| 91 | + "Implementation-Version" to project.version, |
| 92 | + ) |
| 93 | + } |
| 94 | + duplicatesStrategy = DuplicatesStrategy.EXCLUDE |
80 | 95 | } |
81 | 96 |
|
82 | 97 | tasks.named<Jar>("javadocJar") { |
83 | | - duplicatesStrategy = DuplicatesStrategy.EXCLUDE |
| 98 | + duplicatesStrategy = DuplicatesStrategy.EXCLUDE |
84 | 99 | } |
85 | 100 |
|
86 | 101 | tasks.named<Jar>("sourcesJar") { |
87 | | - duplicatesStrategy = DuplicatesStrategy.EXCLUDE |
| 102 | + duplicatesStrategy = DuplicatesStrategy.EXCLUDE |
88 | 103 | } |
89 | 104 |
|
90 | 105 | publishing { |
91 | | - publications { |
92 | | - create<MavenPublication>("mavenJava") { |
93 | | - from(components["java"]) |
94 | | - groupId = project.group.toString() |
95 | | - artifactId = "aws-otel-otlp-udp-exporter" |
96 | | - version = project.version.toString() |
97 | | - } |
| 106 | + publications { |
| 107 | + create<MavenPublication>("mavenJava") { |
| 108 | + from(components["java"]) |
| 109 | + groupId = project.group.toString() |
| 110 | + artifactId = "aws-otel-otlp-udp-exporter" |
| 111 | + version = project.version.toString() |
98 | 112 | } |
| 113 | + } |
99 | 114 | } |
0 commit comments