52 lines
1.4 KiB
Groovy
52 lines
1.4 KiB
Groovy
plugins {
|
|
id "com.github.johnrengelman.shadow"
|
|
}
|
|
apply from: "${rootDir}/gradle/java.gradle"
|
|
|
|
dependencies {
|
|
compile 'com.datadoghq:jmxfetch:0.25.0'
|
|
compile deps.slf4j
|
|
compile project(':dd-trace-api')
|
|
}
|
|
|
|
configurations {
|
|
// exclude bootstrap dependencies from shadowJar
|
|
runtime.exclude module: deps.opentracing
|
|
runtime.exclude module: deps.slf4j
|
|
runtime.exclude group: 'org.slf4j'
|
|
runtime.exclude group: 'io.opentracing'
|
|
}
|
|
|
|
shadowJar {
|
|
dependencies {
|
|
exclude(project(':dd-java-agent:agent-bootstrap'))
|
|
exclude(project(':dd-trace-api'))
|
|
}
|
|
}
|
|
|
|
jar {
|
|
classifier = 'unbundled'
|
|
}
|
|
|
|
task submodulesUpdate(type:Exec) {
|
|
group 'Build Setup'
|
|
description 'Initializes and updates integrations-core git submodule'
|
|
commandLine 'git', 'submodule', 'update', '--init', 'integrations-core'
|
|
}
|
|
|
|
task copyMetricConfigs(type:Exec) {
|
|
group 'Build Setup'
|
|
description 'Copy metrics.yaml files from integrations-core into resources'
|
|
commandLine './copy-metric-configs.sh', 'integrations-core', sourceSets.main.output.resourcesDir
|
|
doFirst {
|
|
// Ensure the resources directory is available.
|
|
file(sourceSets.main.output.resourcesDir).mkdirs()
|
|
}
|
|
}
|
|
|
|
copyMetricConfigs.dependsOn submodulesUpdate
|
|
processResources.finalizedBy copyMetricConfigs
|
|
copyMetricConfigs.mustRunAfter processResources
|
|
// In CI, there seems to be a race condition where processResources overwrites the copied metric config files.
|
|
// Ensure that task runs last to avoid this problem.
|