Gradle M6 - geb and spock versions?


(Matias Bjarland) #1

Seeing as everybody who ever wrote a cool framework for groovy seems to nowadays be associated with gradleware I figured this might somehow perversely end up being the correct forum to post this question : )

I love both spock and geb. Both are excellent enough for us to be in the process of making them integral parts of our mainline development process, thus also virally infecting our customers with this new drug of BDD and executable specification.

I know from the geb documentation and from running that the following combination of versions works:

geb
  0.6.1
  spock
0.5-groovy-1.7
groovy 1.7.x

We have recently switched our devs to gradle M6 and are very happy with it. We have both gradle-plugin and non-plugin projects using M6 and we are using spock to test all of them. We are also using geb for some of the non-plugin projects.

For the plugin projects the above combo seems to no longer be an option as compiling against the gradle api means using groovy 1.8.x. Quoting Peter from an earlier thread:

If you write Gradle plugins in Groovy, you have to compile them against the same

major Groovy version as the one that’s used by Gradle at runtime. From m6 onwards

this means 1.8.x. For testing Groovy 1.8.x code with Spock, you have to use

spock-core-groovy-1.8-SNAPSHOT. If you prefer, you can use a unique snapshot.

So M6 -> groovy 1.8.x -> spock-core-0.6-groovy-1.8-SNAPSHOT. Ok so far so good. Spock even has an excellent page on versions which I personally think should be made mandatory for all open source projects.

But what about geb? After trawling the poms I haven’t been able to figure out a geb version which would work with the 0.6 version of spock. Is there one? What is the version compatibility of the 0.7.0 snapshot? And perhaps more importantly would any of the framework founders or other gurus know what the plan for supported versions going forward will be for gradle, spock, and geb?

For non-plugin projects we at least have a solution. We can just set the groovy version to 1.7.x and stick with spock 0.5 and geb 0.6.1. Not excellent as we then have plugin projects using one version of groovy and spock and the projects which require geb using older versions of both, but it works.

This is not critical and if the answer is that there is no plan then it is what it is. Just figured I would ask in case there was one and I failed to locate it.


(Luke Daley) #2

Geb doesn’t currently work out of the box with Spock 0.6. When Spock 0.6 goes final this will change.

In the meantime see http://jira.codehaus.org/browse/GEB-129 for a workaround.


(Matias Bjarland) #3

Thank you. That answers my question and solves my versioning issues until spock 0.6 final.