# Org.spockframework:spock-core with gradle8/java21/groovy5

**URL:** <https://discuss.gradle.org/t/org-spockframework-spock-core-with-gradle8-java21-groovy5/47407>\
**Category:** Help/Discuss\
**Created:** [January 9, 2024, 5:45pm UTC](https://discuss.gradle.org/t/org-spockframework-spock-core-with-gradle8-java21-groovy5/47407 "2024-01-09T17:45:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ggee](https://avatars.discourse-cdn.com/v4/letter/g/7c8e57/32.png) [@ggee](https://discuss.gradle.org/u/ggee)\
**Post date:** [January 9, 2024, 5:45pm UTC](https://discuss.gradle.org/t/org-spockframework-spock-core-with-gradle8-java21-groovy5/47407/1 "2024-01-09T17:45:39Z")

</div>

Has anyone any got org.spockframework:spock-core work with gradle 8.5/Java 21? I’m assuming this is what is causing my Unsupported class file major version 65 for compileTestGroovy.

```gradle
  testImplementation group: 'org.apache.groovy', name: 'groovy-all', version: '5.0.0-alpha-4', ext: 'pom'
  testImplementation 'org.spockframework:spock-core:2.3-groovy-4.0'

```

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [January 9, 2024, 6:04pm UTC](https://discuss.gradle.org/t/org-spockframework-spock-core-with-gradle8-java21-groovy5/47407/2 "2024-01-09T18:04:22Z")

</div>

You shouldn’t mix Spock variant for Groovy 4 with a Groovy 5 version.  
Spock will complain at you unless you tell it “shut up I know very well what I do”.  
But you also don’t need to.  
Just use the latest Groovy 4 version and it works just fine.  
Also you should not depend on on `groovy-all` unless you really need each and every module, but instead better depend on the actual modules you use or just `groovy` if you do not depend on any other.
