forked from vvanholl/elasticsearch-prometheus-exporter
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
107 lines (90 loc) · 3.1 KB
/
build.gradle
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
102
103
104
105
106
107
import org.gradle.internal.jvm.Jvm
import java.time.Instant
import java.time.ZoneId
buildscript {
ext {
es_version = version.replaceAll(/\.[0-9]+(|-.+)$/, "")
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath "org.elasticsearch.gradle:build-tools:${es_version}"
classpath group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'
classpath group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '4.0.5'
classpath group: 'com.sun.xml.bind', name: 'jaxb-core', version: '4.0.5'
classpath group: 'javax.activation', name: 'activation', version: '1.1.1'
classpath group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.18.2'
}
}
plugins {
id "java"
id "checkstyle"
id "com.github.ben-manes.versions" version "0.51.0"
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'elasticsearch.esplugin'
apply plugin: 'elasticsearch.yaml-rest-test'
apply plugin: 'elasticsearch.testclusters'
// Uncomment if you want to use: System.out.println("Emergency!");
// Logs are found in build/testcluster/integTest-*/logs/ folder.
//forbiddenApis {
// ignoreFailures = true
//}
// No unit tests in this plugin
test.enabled = false
println "Host: " + InetAddress.getLocalHost()
println "Gradle: " + gradle.gradleVersion + " JVM: " + Jvm.current() + " Groovy: " + GroovySystem.getVersion()
println "Build: group: '${project.group}', name: '${project.name}', version: '${project.version}'"
println "Timestamp: " + Instant.now().atZone(ZoneId.systemDefault()).toString()
repositories {
mavenCentral()
mavenLocal()
}
ext {
versions = [
"elasticsearch": es_version,
"prometheus" : "0.16.0",
"log4j" : "2.19.0",
"junit" : "4.13.2"
]
}
configurations {
runtime
releaseJars {
extendsFrom runtime
exclude group: "org.elasticsearch"
exclude group: "org.apache.logging.log4j"
}
}
dependencies {
implementation "org.elasticsearch:elasticsearch:${versions.elasticsearch}"
implementation "io.prometheus:simpleclient:${versions.prometheus}"
implementation "io.prometheus:simpleclient_common:${versions.prometheus}"
implementation "io.prometheus:simpleclient_hotspot:${versions.prometheus}"
implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.2'
yamlRestTestRuntimeOnly "org.apache.logging.log4j:log4j-core:${versions.log4j}"
testImplementation (group: 'junit', name: 'junit', version: "${versions.junit}") {
exclude group:'org.hamcrest' //also included in ES test framework
}
releaseJars "${project.group}:${project.name}:${project.version}"
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << "-Xlint:unchecked,deprecation"
}
esplugin {
licenseFile rootProject.file('LICENSE.txt')
noticeFile rootProject.file('NOTICE.txt')
name pluginName
description pluginDescription
classname pluginClassname
}
testClusters.configureEach {
numberOfNodes = 2
}
checkstyle {
configFile = new File(rootDir, "checkstyle.xml")
toolVersion = "8.2"
}