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.
MODIFY
buildSrc/src/main/groovy/VersionScanPlugin.groovy
buildSrc/src/main/groovy/VersionScanPlugin.groovy
@@ -39,9 +39,9 @@ class VersionScanPlugin implements Plugin<Project> {
description = "Queries for all versions of configured modules and finds key classes"
}
- def hasRelevantTask = project.gradle.startParameter.taskNames.contains('scanVersions')
- hasRelevantTask |= project.gradle.startParameter.taskNames.contains('scanVersionsReport')
- hasRelevantTask |= project.gradle.startParameter.taskNames.contains('verifyVersionScan')
+ def hasRelevantTask = project.gradle.startParameter.taskNames.any { it.contains('scanVersions') }
+ hasRelevantTask |= project.gradle.startParameter.taskNames.any { it.contains('scanVersionsReport') }
+ hasRelevantTask |= project.gradle.startParameter.taskNames.any { it.contains('verifyVersionScan') }
if (!hasRelevantTask) {
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)
}
@@ -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)
}
}

MODIFY
dd-java-agent/integrations/datastax-cassandra-3.2/datastax-cassandra-3.2.gradle
dd-java-agent/integrations/datastax-cassandra-3.2/datastax-cassandra-3.2.gradle
// 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.
// The desire is to apply the instrumentation to cassandra-datastax 2.3 and beyond.
-// apply plugin: 'version-scan'
-// versionScan {
-// group = "com.datastax.cassandra"
-// module = "cassandra-driver-core"
-// versions = "[3.2.0,)"
+apply plugin: 'version-scan'
+
+versionScan {
+ group = "com.datastax.cassandra"
+ module = "cassandra-driver-core"
+ versions = "[3.2.0,)"
// verifyPresent = [
// // class we're advising
// 'com.datastax.driver.core.Cluster$Manager' : null,
// 'com.google.common.util.concurrent.Futures' : null,
// 'com.google.common.util.concurrent.ListenableFuture': null
// ]
-// }
+}
apply from: "${rootDir}/gradle/java.gradle"

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.