The purpose of this project is to help you get started with Spock. The project includes several example specifications and build scripts for Gradle and Maven. It also makes it easy to create an Eclipse or IDEA project, allowing you to run the example specs from within your IDE.
The project uses the https://github.com/spockframework/[Spock Framework Example Project^]
All builds (Gradle and Maven) will automatically download all required dependencies, compile the project, and finally run the example specs. The Gradle build goes one step further by bootstrapping itself, alleviating the need to have a build tool preinstalled.
=== Prerequisites
=== Prerequisites
- JDK 8 or higher
- JDK 17 or higher
- Maven use `mvnw` wrapper
- Maven use `mvnw` wrapper
- Gradle use `gradlew` wrapper
- Gradle use `gradlew` wrapper
NOTE: This example shows the usage of Spock 2.0, which uses the JUnit Platform. If you want to see how to get Spock 1.x with JUnit 4 up and running see the https://github.com/spockframework/spock-example/tree/spock-1.x[Spock-1.x] Branch.
=== Building with Gradle
=== Building with Gradle
Type:
Type:
@ -34,31 +25,3 @@ Type:
Downloaded files will be stored in the local Maven repository (typically *user_home*`/.m2/repository`).
Downloaded files will be stored in the local Maven repository (typically *user_home*`/.m2/repository`).
=== Creating an Eclipse project
Install the https://projects.eclipse.org/projects/tools.buildship[Buildship plugin] if you want to use gradle as build tool.
=== Creating an IDEA project
Just open the project directory with Intelli IDEA and it should auto-detect the project settings.
=== Further Resources
* https://spockframework.org[Spock homepage]
* https://meetspock.appspot.com[Spock web console]