-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
101 lines (85 loc) · 2.55 KB
/
Copy pathbuild.gradle
File metadata and controls
101 lines (85 loc) · 2.55 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
id 'java'
id 'com.google.protobuf' version '0.9.4'
id 'com.diffplug.spotless' version "6.22.0"
id 'maven-publish'
}
group = 'com.aquatic'
version = System.getenv().getOrDefault("VERSION", "0")
description = 'Remote Write Client for Amazon Managed Prometheus'
repositories {
mavenCentral()
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withSourcesJar()
}
dependencies {
implementation 'com.google.protobuf:protobuf-java:3.25.5'
implementation 'org.xerial.snappy:snappy-java:1.1.10.7'
implementation 'software.amazon.awssdk:auth:2.20.84'
implementation 'software.amazon.awssdk:sts:2.20.84'
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation("org.hamcrest:hamcrest:2.2")
}
publishing {
publications {
gpr(MavenPublication) {
from(components.java)
pom {
name.set("amp_exporter_java") // Replace with your project name
description.set("Amazon Managed Prometheus (AMP) Embedded Exporter for Java") // Replace with your project description
url.set("https://github.com/aquanauts/amp_exporter_java") // Replace with your project URL
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
}
}
}
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/aquanauts/amp_exporter_java"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
test {
reports.html.getRequired().set(false)
reports.junitXml.getRequired().set(false)
useJUnitPlatform()
testLogging {
exceptionFormat = 'full'
events TestLogEvent.FAILED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_OUT
}
}
spotless {
java {
palantirJavaFormat("2.35.0")
importOrder(
'com.aquatic',
'',
'java',
'\\#'
)
targetExclude("**/proto/**")
removeUnusedImports()
}
}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.24.3'
}
}