This repository has been archived by the owner on Dec 23, 2023. It is now read-only.
/
build.gradle
107 lines (88 loc) · 2.75 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
description = 'OpenCensus Examples Spring Servlet'
buildscript {
repositories {
mavenCentral()
mavenLocal()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.0.5.RELEASE'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0'
classpath "gradle.plugin.com.github.sherter.google-java-format:google-java-format-gradle-plugin:0.8"
}
}
apply plugin: "checkstyle"
apply plugin: 'com.github.sherter.google-java-format'
apply plugin: 'idea'
apply plugin: 'java'
// Display the version report using: ./gradlew dependencyUpdates
// Also see https://github.com/ben-manes/gradle-versions-plugin.
apply plugin: 'com.github.ben-manes.versions'
repositories {
mavenCentral()
mavenLocal()
}
group = "io.opencensus"
version = "0.28.1" // CURRENT_OPENCENSUS_VERSION
def opencensusVersion = "0.26.0" // LATEST_OPENCENSUS_RELEASE_VERSION
def prometheusVersion = "0.6.0"
def httpasyncclientVersion = "4.1.4"
tasks.withType(JavaCompile) {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
googleJavaFormat {
toolVersion '1.7'
source = 'src/main'
include '**/*.java'
}
verifyGoogleJavaFormat {
source = 'src/main'
include '**/*.java'
}
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
sourceSets {
main {
java {
srcDir 'src'
}
}
}
checkstyle {
configFile = file("$rootDir/../../../buildscripts/checkstyle.xml")
toolVersion = "8.12"
ignoreFailures = false
configProperties["rootDir"] = "$rootDir/../../.."
}
// Disable checkstyle if no java8.
checkstyleMain.source = 'src/main'
checkstyleTest.source = 'src/main'
buildscript {
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.0.5.RELEASE'
}
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
bootJar {
mainClassName = 'com.baeldung.Application'
baseName = 'opencensus-examples-spring-servlet'
version = "0.28.1" // CURRENT_OPENCENSUS_VERSION
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencyManagement {
imports {
mavenBom "io.opencensus:opencensus-contrib-spring-starter:${opencensusVersion}"
}
}
dependencies {
compile("io.opencensus:opencensus-contrib-spring-starter:${opencensusVersion}")
compile("io.opencensus:opencensus-exporter-stats-prometheus:${opencensusVersion}",
"io.opencensus:opencensus-exporter-trace-logging:${opencensusVersion}",
"io.prometheus:simpleclient_httpserver:${prometheusVersion}",
"org.apache.httpcomponents:httpasyncclient:${httpasyncclientVersion}")
}