Spock 2.4 is released, but the README still advertises a 2.4 snapshot
The Enterprise-ready testing and specification framework.
At a glance
- What is it?
- spockframework/spock is a BDD-style testing and specification framework for Java and Groovy built on the JUnit Platform. Reading its own documentation closely turns up a version attribute that never advanced, four module directories the module list omits, a default Groovy variant that cannot run on a current JDK, and two different group IDs for the same artifacts.
- Who is it for?
- Spock fits a team that already runs Gradle and wants executable specifications on the JUnit Platform with Groovy as the specification language. Two things are worth confirming before adopting it.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly Java, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- spockframework/spock3,629 ★ · +0
| Repository | 2026-09-24 | 2026-11-15 |
|---|---|---|
| spockframework/spock | 3.6k | 3.6k |
0 Stars in the last 52 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The snapshot attribute still reads 2.4 after 2.4 shipped in December 2025
The README is an AsciiDoc template, and its version attributes have drifted away from the release history. Three attributes at the top of the file carry the numbers: the release version, the release date, and the snapshot version. The release pair reads 2.4 and 2025-12-11, which matches the newest tag. The snapshot attribute still reads 2.4, so the file goes on describing an in-progress 2.4-SNAPSHOT line for a version that already shipped. Master has moved further than that. The last commit on the default branch is dated 2026-09-24, about nine months after the 2.4 release, and no tag was cut in that window. A reader tracking progress from this file alone would conclude that development is still finishing 2.4, when the branch evidence points at work that has never been versioned. Because the same attribute feeds several places in the text, the drift is consistent rather than obvious, which is what makes it easy to miss.
The default Groovy variant is the one that cannot run on a current JDK
Supported versions are given as a matrix, and the default cell is a broken one. Spock is supported for Java 8 and newer, and for Groovy 2.5, 3.0, 4.0, and 5.0. Two exclusions follow directly. Groovy 2.5 does not work with Java 17 or newer, and Groovy 5.0 and newer does not work with Java older than 11. The default Groovy version for the project's own test runs is 2.5, which is exactly the pairing that fails on a current long-term JDK. Groovy 3.0 and 4.0 are named as the variants that should pass across all supported JDK versions, and the release note recommends Groovy 3.0 or newer for projects on Java 12 or later. Choosing a variant is a single flag:
./gradlew build -Dvariant=4.0Anyone building on a modern JDK therefore has to override the default before anything compiles, even though the default is the variant the project itself tests with most often.
Runtime support starts at Java 8, but building needs two JDKs installed at once
Using the library and building it are two different problems with two different requirements. Runtime support begins at Java 8. The build needs both a JDK 11 and a JDK 17 or newer present on the machine: JDK 11 is what compiles Spock through Gradle toolchains, and JDK 17 or newer is what runs Gradle itself. Toolchain auto-download is switched off, so both installations must already exist before the first invocation. Locations outside the paths Gradle recognises by default have to be announced through environment variables of the form JDK<version>=<PATH>, with JDK11 given as the worked example. Targeting a specific Java version reuses the same mechanism and combines with the variant flag:
./gradlew build -DjavaVersion=17A contributor lines up three things before that build starts: two JDK installations, a version choice, and an environment variable if either JDK lives somewhere Gradle will not find. All build dependencies, the Gradle distribution included, are fetched on demand unless already present. The Windows invocation differs by one character, since cmd.exe takes gradlew build.
Intermediate builds come from a host that renames the groupId
Releases and snapshots arrive under org.spockframework, so the coordinates read spock-core and its siblings beneath that group. Ad-hoc intermediate stable builds are pointed at a different service, and the groupId changes with the host. The snippet given for that path is:
repositories {
// ...
maven { url 'https://jitpack.io' }
}
dependencies {
testImplementation 'org.spockframework.spock:spock-core:spock-{spock-release-version}'
testImplementation 'org.spockframework.spock:spock-spring:spock-{spock-release-version}'
}The braces around the version are the AsciiDoc release attribute, substituted when the page renders, so the file as committed is not a runnable coordinate string and has to be filled in before it works. The practical consequence sits in dependency management: a build file wired to intermediate builds does not use the groupId the release line uses, so a version-range rule or a repository mirror scoped to org.spockframework will silently miss those artifacts. A jitpack.yml at the repository root is what allows that host to build the project at all. A third form is offered for intermediate releases, compiling straight from a commit hash, for example com.github.spockframework.spock:spock-core:d91bf785a1.
Four directories in the root tree are missing from the module list
The module list and the repository tree disagree about what ships. Six modules are described: spock-core as the only mandatory one, spock-specs holding the specifications for spock-core and explicitly not required for using Spock, and integrations for Spring, Tapestry, Guice, and Unitils. The root tree carries four more module directories that the list never mentions, namely spock-bom, spock-groovy2-compat, spock-junit4, and spock-testkit. The Java 9 module names section repeats the gap in narrower form. Automatic-Module-Name is declared for five artifacts, spock-core, spock-spring, spock-tapestry, spock-guice, and spock-unitils, leaving those four directories without a published module name anywhere in the documentation:
open module foo.bar {
requires org.spockframework.core;
requires org.spockframework.spring;
}A project on the module path can require the five named modules by their well-known names and has nothing documented to require for the rest. The presence of spock-junit4 in a framework that states it is based on the JUnit Platform is also worth a look from anyone deciding where the project's compatibility surface actually ends.
Agent-facing configuration files sit in the root of a Java test framework
Alongside the ordinary build files, the root carries AI_POLICY.md, AGENTS.md, a .claude directory, and context7.json. None of the four is mentioned in the README, and none belongs to the six documented modules, so a reader working from the documentation alone would not anticipate them. A .claude directory in particular suggests the repository ships its own agent configuration rather than depending on whatever a contributor has set up globally. For contributors the effect is narrow but real: the project states a position on automated contributions in a file that has to be opened before a pull request is raised, while the contributing and support sections of the README say nothing about it. The same root also carries config/, build-logic/, and an allVariants script alongside its .bat counterpart, which is how the variant matrix gets exercised across the supported Groovy versions.
Running a sample spec in a browser is offered by link alone
One capability is stated in the introduction and left there. The README says that a sample spec can be run in the browser and points at the Groovy Web Console to do it. No sample spec, no configuration, and no account of what that console contains accompanies the sentence. A Java and Groovy framework executing a specification inside a browser session is a materially different proposition from running it under Gradle, and nothing in the file lets a reader tell whether the console hosts the framework itself or only a prebuilt sample project. The Links section at the end names the project homepage and then the Groovy Web Console, and the console's address stops partway through, so the reference list ends before its final entries are written out. Taken with the truncated opening, the README's own edges are where several of this project's unanswered questions sit.
Editorial conclusion
Spock fits a team that already runs Gradle and wants executable specifications on the JUnit Platform with Groovy as the specification language. Two things are worth confirming before adopting it. Pick a Groovy variant deliberately rather than inheriting 2.5, because 2.5 is the default the project tests with and the one that fails on Java 17 and newer. And if you need JUnit 4, Tapestry, Guice, Unitils, or a module-path integration, verify which artifacts you actually require, since the documented module list and the tree disagree and Automatic-Module-Name is published for only five of them.
Frequently asked questions
What does spockframework/spock require in order to build from source?
Both a JDK 11 and a JDK 17 or newer, because JDK 11 compiles the project through Gradle toolchains with automatic download disabled and JDK 17 or newer runs Gradle itself. JDKs outside Gradle's standard locations must be exposed through JDK<version>=<PATH> environment variables.
Which Java and Groovy versions does spockframework/spock support?
Java 8 and newer, and Groovy 2.5, 3.0, 4.0, and 5.0, with two exclusions. Groovy 2.5 does not work with Java 17 or newer, and Groovy 5.0 and newer does not work with Java older than 11. The default Groovy version for the project's own tests is 2.5.
How do I get an intermediate build of spockframework/spock?
Intermediate stable builds are recommended from JitPack, added as a repository, with groupId org.spockframework.spock rather than the org.spockframework used by Maven Central releases. Intermediate releases can also be compiled straight from a commit hash, for example com.github.spockframework.spock:spock-core:d91bf785a1.
What is the difference between spock-core and the other Spock modules?
spock-core is the core framework and the only mandatory module, while spock-specs holds the specifications for spock-core and is not needed to use Spock. spock-spring, spock-tapestry, spock-guice, and spock-unitils integrate with those containers. The repository tree also contains spock-bom, spock-groovy2-compat, spock-junit4, and spock-testkit, which the module list does not cover.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/spockframework-spock)Star history chart for your README
[](https://hysenlabs.com/projects/spockframework-spock)Was this useful?