-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
102 lines (84 loc) · 3.79 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
description = 'OpenCensus Jetty Examples'
buildscript {
repositories {
mavenCentral()
mavenLocal()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.3'
}
}
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'com.google.protobuf'
repositories {
mavenCentral()
mavenLocal()
}
group = "io.opencensus.contrib.example"
version = "0.1.0-SNAPSHOT" // CURRENT_VERSION
def opencensusVersion = "0.19.0-SNAPSHOT" // LATEST_OPENCENSUS_RELEASE_VERSION
def jettyVersion = "9.4.12.v20180830"
def jettyServletVersion = "9.4.6.v20170531"
def prometheusVersion = "0.3.0"
def okhttpVersion = "0.3.12"
tasks.withType(JavaCompile) {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
dependencies {
compile "io.opencensus:opencensus-contrib-http-util:${opencensusVersion}",
"io.opencensus:opencensus-contrib-http-servlet:${opencensusVersion}",
"io.opencensus:opencensus-contrib-http-jetty-client:${opencensusVersion}",
"io.opencensus:opencensus-exporter-trace-jaeger:${opencensusVersion}",
"io.opencensus:opencensus-exporter-trace-logging:${opencensusVersion}",
"io.opencensus:opencensus-exporter-trace-stackdriver:${opencensusVersion}",
"io.opencensus:opencensus-exporter-stats-stackdriver:${opencensusVersion}",
"io.opencensus:opencensus-exporter-stats-prometheus:${opencensusVersion}",
"io.prometheus:simpleclient_httpserver:${prometheusVersion}",
"org.eclipse.jetty:jetty-server:${jettyVersion}",
"org.eclipse.jetty:jetty-client:${jettyVersion}",
"org.eclipse.jetty:jetty-servlet:${jettyServletVersion}",
"com.squareup.okhttp3:okhttp:${okhttpVersion}"
compile "javax.servlet:javax.servlet-api:3.0.1"
// "javax.ws.rs:javax.ws.rs-api:2.0"
// https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25'
// compile group: 'org.glassfish.jersey.core', name: 'jersey-server', version: '2.7'
// compile group: 'org.glassfish.jersey.containers', name: 'jersey-container-servlet-core', version: '2.7'
// compile group: 'org.glassfish.jersey.containers', name: 'jersey-container-jetty-http', version: '2.7'
// compile group: 'org.glassfish.jersey.media', name: 'jersey-media-moxy', version: '2.7'
// compile group: 'org.eclipse.jetty.aggregate', name: 'jetty-all', version: '9.3.0.M1'
runtime "io.opencensus:opencensus-impl:${opencensusVersion}",
"io.netty:netty-tcnative-boringssl-static:2.0.8.Final"
}
// Provide convenience executables for trying out the examples.
apply plugin: 'application'
startScripts.enabled = false
task helloWorldServer(type: CreateStartScripts) {
mainClassName = 'io.opencensus.contrib.examples.server.HelloWorldServer'
applicationName = 'HelloWorldServer'
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}
task helloWorldClient(type: CreateStartScripts) {
mainClassName = 'io.opencensus.contrib.examples.client.HelloWorldClient'
applicationName = 'HelloWorldClient'
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}
task helloWorldClientOkHttp(type: CreateStartScripts) {
mainClassName = 'io.opencensus.contrib.examples.okhttpclient.HelloWorldClient'
applicationName = 'HelloWorldClientOkHttp'
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}
applicationDistribution.into('bin') {
from(helloWorldServer)
from(helloWorldClient)
from(helloWorldClientOkHttp)
fileMode = 0755
}