File tree 6 files changed +40
-17
lines changed
6 files changed +40
-17
lines changed Original file line number Diff line number Diff line change @@ -29,19 +29,22 @@ include "spock-spring"
29
29
include " spock-spring:spring3-test"
30
30
include " spock-guice"
31
31
include " spock-junit4"
32
- include " spock-temp"
33
32
include " spock-testkit"
34
33
35
34
if ((System . getProperty(" variant" ) as BigDecimal ?: 2.5 ) != 3.0 ) {
36
35
// Remove once Groovy 2.5 support is dropped
37
36
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"
38
40
}
39
41
40
42
// https://issues.apache.org/jira/projects/TAP5/issues/TAP5-2588
41
43
if (JavaVersion . current(). isJava8()) {
42
44
include " spock-tapestry"
43
45
}
44
46
47
+
45
48
include " spock-unitils"
46
49
include " spock-gradle"
47
50
Original file line number Diff line number Diff line change 18
18
' Implementation-Title' : project. name,
19
19
' Implementation-Version' : variantLessVersion,
20
20
' Implementation-Vendor' : ' spockframework.org' ,
21
- ' Automatic-Module-Name' : ' org.spockframework.groovy2-compat '
21
+ ' Automatic-Module-Name' : ' org.spockframework.groovy2compat '
22
22
)
23
23
}
24
24
}
Original file line number Diff line number Diff line change @@ -2,35 +2,35 @@ ext.displayName = "Spock Framework - Temp Specs for Core Module"
2
2
3
3
apply plugin : " spock-base"
4
4
5
- // configurations {
6
- // junit
7
- // }
8
-
9
5
dependencies {
10
6
testCompile project(" :spock-core" )
11
7
12
8
testRuntime libs. asm
13
9
testRuntime libs. bytebuddy
14
10
testRuntime libs. cglib
15
11
testRuntime libs. objenesis
16
- testRuntime libs. h2database
17
-
18
- // junit libs.junit4
19
12
}
20
13
21
14
sourceCompatibility = javaVersion
22
15
targetCompatibility = javaVersion
23
16
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
+
29
29
30
30
test {
31
31
useJUnitPlatform()
32
32
reports. junitXml. enabled = true
33
- reports. html. enabled = false
33
+ reports. html. enabled = true
34
34
35
35
testLogging. exceptionFormat = " full"
36
36
testLogging. showExceptions = true
Original file line number Diff line number Diff line change 1
- package temp
1
+ package org.acme.test
2
2
3
3
import spock.lang.Specification
4
4
5
- class FirstSpec extends Specification {
5
+ class ModuleSmokeSpec extends Specification {
6
6
7
7
def " works" () {
8
8
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