Fix version scan plugin
Now you can run `./gradlew :dd-java-agent:integrations:datastax-cassandra-3.2::scanVersionsReport -PshowClasses` to show you the classes you can use for that version range.
This commit is contained in:
parent
7298b0a31a
commit
3ea7ad73ed
|
@ -39,9 +39,9 @@ class VersionScanPlugin implements Plugin<Project> {
|
||||||
description = "Queries for all versions of configured modules and finds key classes"
|
description = "Queries for all versions of configured modules and finds key classes"
|
||||||
}
|
}
|
||||||
|
|
||||||
def hasRelevantTask = project.gradle.startParameter.taskNames.contains('scanVersions')
|
def hasRelevantTask = project.gradle.startParameter.taskNames.any { it.contains('scanVersions') }
|
||||||
hasRelevantTask |= project.gradle.startParameter.taskNames.contains('scanVersionsReport')
|
hasRelevantTask |= project.gradle.startParameter.taskNames.any { it.contains('scanVersionsReport') }
|
||||||
hasRelevantTask |= project.gradle.startParameter.taskNames.contains('verifyVersionScan')
|
hasRelevantTask |= project.gradle.startParameter.taskNames.any { it.contains('verifyVersionScan') }
|
||||||
|
|
||||||
if (!hasRelevantTask) {
|
if (!hasRelevantTask) {
|
||||||
return
|
return
|
||||||
|
@ -80,7 +80,7 @@ class VersionScanPlugin implements Plugin<Project> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (project.gradle.startParameter.taskNames.contains('scanVersions')) {
|
if (project.gradle.startParameter.taskNames.any { it.contains('scanVersions') }) {
|
||||||
scanVersions.finalizedBy(scanVersionsReport)
|
scanVersions.finalizedBy(scanVersionsReport)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ class VersionScanPlugin implements Plugin<Project> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (project.gradle.startParameter.taskNames.contains('scanVersions')) {
|
if (project.gradle.startParameter.taskNames.any { it.contains('scanVersions') }) {
|
||||||
scanVersions.finalizedBy(verifyVersionScan)
|
scanVersions.finalizedBy(verifyVersionScan)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,32 +1,33 @@
|
||||||
// TODO: VersionScan plugin does not report which version failed, which is making it hard to get meaningful results out of this block.
|
// TODO: VersionScan plugin does not report which version failed, which is making it hard to get meaningful results out of this block.
|
||||||
// Once versionScan can report on which version failed, this can be enabled.
|
// Once versionScan can report on which version failed, this can be enabled.
|
||||||
// The desire is to apply the instrumentation to cassandra-datastax 2.3 and beyond.
|
// The desire is to apply the instrumentation to cassandra-datastax 2.3 and beyond.
|
||||||
// apply plugin: 'version-scan'
|
|
||||||
|
|
||||||
// versionScan {
|
apply plugin: 'version-scan'
|
||||||
// group = "com.datastax.cassandra"
|
|
||||||
// module = "cassandra-driver-core"
|
versionScan {
|
||||||
// versions = "[3.2.0,)"
|
group = "com.datastax.cassandra"
|
||||||
// verifyPresent = [
|
module = "cassandra-driver-core"
|
||||||
// // class we're advising
|
versions = "[3.2.0,)"
|
||||||
// 'com.datastax.driver.core.Cluster$Manager': null,
|
// verifyPresent = [
|
||||||
// // used by TracingSession
|
// // class we're advising
|
||||||
// 'com.datastax.driver.core.BoundStatement' : null,
|
// 'com.datastax.driver.core.Cluster$Manager' : null,
|
||||||
// 'com.datastax.driver.core.BoundStatement' : null,
|
// // used by TracingSession
|
||||||
// 'com.datastax.driver.core.CloseFuture' : null,
|
// 'com.datastax.driver.core.BoundStatement' : null,
|
||||||
// 'com.datastax.driver.core.Cluster' : null,
|
// 'com.datastax.driver.core.BoundStatement' : null,
|
||||||
// 'com.datastax.driver.core.Host' : null,
|
// 'com.datastax.driver.core.CloseFuture' : null,
|
||||||
// 'com.datastax.driver.core.PreparedStatement' : null,
|
// 'com.datastax.driver.core.Cluster' : null,
|
||||||
// 'com.datastax.driver.core.RegularStatement' : null,
|
// 'com.datastax.driver.core.Host' : null,
|
||||||
// 'com.datastax.driver.core.ResultSet' : null,
|
// 'com.datastax.driver.core.PreparedStatement' : null,
|
||||||
// 'com.datastax.driver.core.ResultSetFuture' : null,
|
// 'com.datastax.driver.core.RegularStatement' : null,
|
||||||
// 'com.datastax.driver.core.Session' : null,
|
// 'com.datastax.driver.core.ResultSet' : null,
|
||||||
// 'com.datastax.driver.core.Statement' : null,
|
// 'com.datastax.driver.core.ResultSetFuture' : null,
|
||||||
// 'com.google.common.base.Function' : null,
|
// 'com.datastax.driver.core.Session' : null,
|
||||||
// 'com.google.common.util.concurrent.Futures' : null,
|
// 'com.datastax.driver.core.Statement' : null,
|
||||||
// 'com.google.common.util.concurrent.ListenableFuture' : null
|
// 'com.google.common.base.Function' : null,
|
||||||
// ]
|
// 'com.google.common.util.concurrent.Futures' : null,
|
||||||
// }
|
// 'com.google.common.util.concurrent.ListenableFuture': null
|
||||||
|
// ]
|
||||||
|
}
|
||||||
|
|
||||||
apply from: "${rootDir}/gradle/java.gradle"
|
apply from: "${rootDir}/gradle/java.gradle"
|
||||||
|
|
||||||
|
@ -40,4 +41,4 @@ dependencies {
|
||||||
|
|
||||||
compile deps.bytebuddy
|
compile deps.bytebuddy
|
||||||
compile deps.opentracing
|
compile deps.opentracing
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue