cassandra-3.0.gradle 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Set properties before any plugins get loaded
  2. ext {
  3. // TODO switch to container-based tests (away from cassandraunit)
  4. // Tests use cassandraunit, which runs embedded Cassandra 3, which requires Java 8
  5. // (and is currently incompatible with Java 9.)
  6. minJavaVersionForTests = JavaVersion.VERSION_1_8
  7. maxJavaVersionForTests = JavaVersion.VERSION_1_8
  8. cassandraDriverTestVersions = "[3.0,4.0)"
  9. }
  10. apply from: "$rootDir/gradle/instrumentation.gradle"
  11. apply plugin: 'org.unbroken-dome.test-sets'
  12. // TODO switch to container-based tests (away from cassandraunit)
  13. // then we can run tests using Java 7 (see above) and won't need this override section
  14. java {
  15. sourceCompatibility = JavaVersion.VERSION_1_7
  16. targetCompatibility = JavaVersion.VERSION_1_7
  17. }
  18. muzzle {
  19. pass {
  20. group = "com.datastax.cassandra"
  21. module = "cassandra-driver-core"
  22. versions = cassandraDriverTestVersions
  23. assertInverse = true
  24. // Older versions of cassandra-driver-core require an older guava dependency (0.16.0). guava >20.0 is not
  25. // compatible with Java 7, so we declare the dependency on 20.0 in our top level dependencies.gradle.
  26. // Ideally our muzzle plugin should take into account those versions declaration, instead it does not so we would
  27. // end up with testing compatibility with guava 0.16 which lacks the method invocation added to be compatible with
  28. // most recent versions of guava (27+). While the long term solution is to make the muzzle plugin aware of upstream
  29. // declared dependencies, for now we just make sure that we use the proper ones.
  30. extraDependency "com.google.guava:guava:20.0"
  31. }
  32. // Making sure that instrumentation works with recent versions of Guava which removed method
  33. // Futures::transform(input, function) in favor of Futures::transform(input, function, executor)
  34. pass {
  35. name = "Newest versions of Guava"
  36. group = "com.datastax.cassandra"
  37. module = "cassandra-driver-core"
  38. versions = cassandraDriverTestVersions
  39. // While com.datastax.cassandra uses old versions of Guava, users may depends themselves on newer versions of Guava
  40. extraDependency "com.google.guava:guava:27.0-jre"
  41. }
  42. }
  43. testSets {
  44. latestDepTest {
  45. dirName = 'test'
  46. }
  47. }
  48. dependencies {
  49. implementation(project(':utils:thread-utils'))
  50. compileOnly group: 'com.datastax.cassandra', name: 'cassandra-driver-core', version: '3.0.0'
  51. testImplementation group: 'com.datastax.cassandra', name: 'cassandra-driver-core', version: '3.2.0'
  52. testImplementation group: 'org.cassandraunit', name: 'cassandra-unit', version: '3.1.3.2'
  53. latestDepTestImplementation group: 'com.datastax.cassandra', name: 'cassandra-driver-core', version: '3.+'
  54. }