blob: e69c088e5211c4e51e59e9b1bcd4d123bc10b960 [file] [log] [blame]
description = 'Instrumentation: Examples'
tasks.withType(JavaCompile) {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
dependencies {
compile project(':instrumentation-java-core'),
project(':instrumentation-java-core-impl'),
project(':instrumentation-java-core-impl-java'),
libraries.grpc_context
}
// Provide convenience executables for trying out the examples.
apply plugin: 'application'
startScripts.enabled = false
task statsRunner(type: CreateStartScripts) {
mainClassName = 'com.google.instrumentation.trace.examples.StatsRunner'
applicationName = 'StatsRunner'
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}
task multiSpansTracing(type: CreateStartScripts) {
mainClassName = 'com.google.instrumentation.trace.examples.MultiSpansTracing'
applicationName = 'MultiSpansTracing'
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}
task multiSpansScopedTracing(type: CreateStartScripts) {
mainClassName = 'com.google.instrumentation.trace.examples.MultiSpansScopedTracing'
applicationName = 'MultiSpansScopedTracing'
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}
task multiSpansContextTracing(type: CreateStartScripts) {
mainClassName = 'com.google.instrumentation.trace.examples.MultiSpansContextTracing'
applicationName = 'MultiSpansContextTracing'
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}
applicationDistribution.into('bin') {
from(multiSpansTracing)
from(multiSpansScopedTracing)
from(multiSpansContextTracing)
from(statsRunner)
fileMode = 0755
}