opentelemetry-java-instrume.../instrumentation/cassandra/cassandra-3.0/cassandra-3.0.gradle

56 lines
2.5 KiB
Groovy

// Set properties before any plugins get loaded
ext {
// TODO switch to container-based tests (away from cassandraunit)
// Tests use cassandraunit, which runs embedded Cassandra 3, which requires Java 8
// (and is currently incompatible with Java 9.)
minJavaVersionForTests = JavaVersion.VERSION_1_8
maxJavaVersionForTests = JavaVersion.VERSION_1_8
cassandraDriverTestVersions = "[3.0,4.0)"
}
apply from: "$rootDir/gradle/instrumentation.gradle"
// TODO switch to container-based tests (away from cassandraunit)
// then we can run tests using Java 7 (see above) and won't need this override section
java {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
muzzle {
pass {
group = "com.datastax.cassandra"
module = "cassandra-driver-core"
versions = cassandraDriverTestVersions
assertInverse = true
// Older versions of cassandra-driver-core require an older guava dependency (0.16.0). guava >20.0 is not
// compatible with Java 7, so we declare the dependency on 20.0 in our top level dependencies.gradle.
// Ideally our muzzle plugin should take into account those versions declaration, instead it does not so we would
// end up with testing compatibility with guava 0.16 which lacks the method invocation added to be compatible with
// most recent versions of guava (27+). While the long term solution is to make the muzzle plugin aware of upstream
// declared dependencies, for now we just make sure that we use the proper ones.
extraDependency "com.google.guava:guava:20.0"
}
// Making sure that instrumentation works with recent versions of Guava which removed method
// Futures::transform(input, function) in favor of Futures::transform(input, function, executor)
pass {
name = "Newest versions of Guava"
group = "com.datastax.cassandra"
module = "cassandra-driver-core"
versions = cassandraDriverTestVersions
// While com.datastax.cassandra uses old versions of Guava, users may depends themselves on newer versions of Guava
extraDependency "com.google.guava:guava:27.0-jre"
}
}
dependencies {
library group: 'com.datastax.cassandra', name: 'cassandra-driver-core', version: '3.0.0'
testLibrary group: 'com.datastax.cassandra', name: 'cassandra-driver-core', version: '3.2.0'
testImplementation group: 'org.cassandraunit', name: 'cassandra-unit', version: '3.1.3.2'
latestDepTestLibrary group: 'com.datastax.cassandra', name: 'cassandra-driver-core', version: '3.+'
}