Project initialization.

main 0.1.0
KKlochko 2 years ago
parent c1846e60a4
commit dabb09c518

6
.gitignore vendored

@ -14,6 +14,12 @@ target/
.settings/
bin/
# Emacs
*~
.\#*
\#*\#
.*.~undo-tree~
# IDEA
*.iws
*.ipr

@ -1,25 +1,16 @@
[.float-group]
--
image::https://img.shields.io/badge/License-Apache%202.0-blue.svg[link=https://github.com/spockframework/spock/blob/master/LICENSE,float=left]
image::https://github.com/spockframework/spock-example/actions/workflows/main.yml/badge.svg[link=https://github.com/spockframework/spock-example/actions/workflows/main.yml,float=left]
image::https://badges.gitter.im/spockframework/spock.svg[link=https://gitter.im/spockframework/spock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge,float=left]
--
== Spock Framework Example Project
== simple-jbdd
This project is a simple BDD framework.
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.
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.
The project uses the https://github.com/spockframework/[Spock Framework Example Project^]
=== Prerequisites
- JDK 8 or higher
- JDK 17 or higher
- Maven use `mvnw` 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
Type:
@ -34,31 +25,3 @@ Type:
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]
* https://docs.spockframework.org/[Main documentation]
* https://stackoverflow.com/questions/tagged/spock[Spock on Stackoverflow]
* https://gitter.im/spockframework/spock[Spock Chat]
* https://github.com/spockframework/spock/discussions[Discussion group]
* https://issues.spockframework.org[Issue tracker]
* https://twitter.com/spockframework[Spock on Twitter]
* https://gradle.org[Gradle homepage]
* https://groovy-lang.org/[Groovy homepage]
* https://maven.apache.org[Maven homepage]
If you have any comments or questions, please direct them to the Spock discussion group. We appreciate all feedback!
Happy spec'ing!
The Spock Framework Team

@ -3,20 +3,18 @@ plugins {
}
version = "1.0"
description = "Spock Framework - Example Project"
description = "simple-jbdd is a simple BDD testing framework for Java."
// Spock works with Java 1.8 and above
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
languageVersion.set(JavaLanguageVersion.of(17))
}
}
repositories {
// Spock releases are available from Maven Central
mavenCentral()
// Spock snapshots are available from the Sonatype OSS snapshot repository
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
@ -31,10 +29,6 @@ dependencies {
testImplementation "org.hamcrest:hamcrest-core:2.2" // only necessary if Hamcrest matchers are used
testRuntimeOnly 'net.bytebuddy:byte-buddy:1.14.8' // allows mocking of classes (in addition to interfaces)
testRuntimeOnly "org.objenesis:objenesis:3.3" // allows mocking of classes without default constructor (together with ByteBuddy or CGLIB)
// dependencies used by examples in this project
testRuntimeOnly "com.h2database:h2:2.2.222"
implementation "org.apache.groovy:groovy-sql"
}
test {

@ -2,11 +2,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.spockframework</groupId>
<artifactId>spock-example</artifactId>
<groupId>space.kklochko</groupId>
<artifactId>simple_jbdd</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Spock Framework - Example Project</name>
<name>simple-jbdd</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -124,27 +124,4 @@
<version>${groovy.version}</version>
</dependency>
</dependencies>
<repositories>
<!-- Only required if a snapshot version of Spock is used -->
<repository>
<id>spock-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<!-- Only required in spock-example build -->
<distributionManagement>
<repository>
<id>foo</id>
<url>file:///fake.repository.to.make.maven.happy</url>
</repository>
<snapshotRepository>
<id>bar</id>
<url>file:///fake.repository.to.make.maven.happy</url>
</snapshotRepository>
</distributionManagement>
</project>

@ -1 +1 @@
rootProject.name = "spock-example"
rootProject.name = "simple_bdd"
Loading…
Cancel
Save