File tree Expand file tree Collapse file tree 6 files changed +40
-17
lines changed Expand file tree Collapse file tree 6 files changed +40
-17
lines changed Original file line number Diff line number Diff line change @@ -29,19 +29,22 @@ include "spock-spring"
2929include " spock-spring:spring3-test"
3030include " spock-guice"
3131include " spock-junit4"
32- include " spock-temp"
3332include " spock-testkit"
3433
3534if ((System . getProperty(" variant" ) as BigDecimal ?: 2.5 ) != 3.0 ) {
3635 // Remove once Groovy 2.5 support is dropped
3736 include " spock-groovy2-compat"
37+ } else if (JavaVersion . current(). isJava9Compatible()) {
38+ // works only in Java 9+ and groovy 3+ as spock-groovy2-compat is incompatible with the module system
39+ include " spock-module-test"
3840}
3941
4042// https://issues.apache.org/jira/projects/TAP5/issues/TAP5-2588
4143if (JavaVersion . current(). isJava8()) {
4244 include " spock-tapestry"
4345}
4446
47+
4548include " spock-unitils"
4649include " spock-gradle"
4750
Original file line number Diff line number Diff line change 1818 ' Implementation-Title' : project. name,
1919 ' Implementation-Version' : variantLessVersion,
2020 ' Implementation-Vendor' : ' spockframework.org' ,
21- ' Automatic-Module-Name' : ' org.spockframework.groovy2-compat '
21+ ' Automatic-Module-Name' : ' org.spockframework.groovy2compat '
2222 )
2323 }
2424}
Original file line number Diff line number Diff line change @@ -2,35 +2,35 @@ ext.displayName = "Spock Framework - Temp Specs for Core Module"
22
33apply plugin : " spock-base"
44
5- // configurations {
6- // junit
7- // }
8-
95dependencies {
106 testCompile project(" :spock-core" )
117
128 testRuntime libs. asm
139 testRuntime libs. bytebuddy
1410 testRuntime libs. cglib
1511 testRuntime libs. objenesis
16- testRuntime libs. h2database
17-
18- // junit libs.junit4
1912}
2013
2114sourceCompatibility = javaVersion
2215targetCompatibility = javaVersion
2316
24- // necessary to make @NotYetImplemented transform work (transform that ships
25- // with Groovy and statically references third-party class junit.framwork.AssertionFailedError)
26- // tasks.withType(GroovyCompile) {
27- // groovyClasspath += configurations.junit
28- // }
17+ tasks. withType(JavaCompile ) {
18+ sourceCompatibility = javaVersion
19+ targetCompatibility = javaVersion
20+ options. compilerArgs - = [' --release' , ' 8' ]
21+ options. encoding = ' UTF-8'
22+ }
23+
24+ java {
25+ // enable module path
26+ modularity. inferModulePath = true
27+ }
28+
2929
3030test {
3131 useJUnitPlatform()
3232 reports. junitXml. enabled = true
33- reports. html. enabled = false
33+ reports. html. enabled = true
3434
3535 testLogging. exceptionFormat = " full"
3636 testLogging. showExceptions = true
Original file line number Diff line number Diff line change 1- package temp
1+ package org.acme.test
22
33import spock.lang.Specification
44
5- class FirstSpec extends Specification {
5+ class ModuleSmokeSpec extends Specification {
66
77 def " works" () {
88 expect : true
Original file line number Diff line number Diff line change 1+ open module org .acme .test {
2+ exports org .acme .test ;
3+
4+ requires java .desktop ;
5+
6+ requires org .spockframework .core ;
7+ }
Original file line number Diff line number Diff line change 1+ package org .acme .test ;
2+
3+ public class PojoClass {
4+ private String id ;
5+
6+ public String getId () {
7+ return id ;
8+ }
9+
10+ public void setId (String id ) {
11+ this .id = id ;
12+ }
13+ }
You can’t perform that action at this time.
0 commit comments