Skip to content

Commit 0254e82

Browse files
committed
Cleanup build.gradle in grace-test-* modules
Now grace-test-suite-persistence, grace-test-suite-uber and grace-test-suite-web no longer depend on grace-data-hibernate to execute tests Closes gh-1586
1 parent 2cea0c1 commit 0254e82

5 files changed

Lines changed: 44 additions & 118 deletions

File tree

grace-test-suite-base/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ dependencies {
66
api project(":grace-plugin-core")
77
api project(":grace-plugin-domain-class")
88
api project(":grace-spring")
9-
api project(":grace-web")
109
api project(":grace-test")
10+
api project(":grace-web")
1111

12-
compileOnly libs.jakarta.servlet
1312
compileOnly libs.grace.datastore.gorm.support
13+
compileOnly libs.jakarta.servlet
1414
testImplementation libs.jakarta.servlet
1515
}
Lines changed: 17 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
configurations.testCompileClasspath {
2-
exclude module: "grails-plugin-testing"
3-
}
4-
51
dependencies {
62
testImplementation project(":grace-boot")
73
testImplementation project(":grace-bootstrap")
@@ -17,32 +13,8 @@ dependencies {
1713
testImplementation project(":grace-test-support")
1814

1915
testImplementation libs.grace.async.core
16+
testImplementation libs.grace.datastore.gorm
2017
testImplementation libs.grace.datastore.gorm.validation
21-
testImplementation libs.grace.datastore.gorm.hibernate, {
22-
exclude group: 'org.graceframework', module:'grace-datastore-gorm'
23-
exclude group: 'org.graceframework', module:'grace-datastore-core'
24-
exclude group: 'org.springframework', module:'spring-core'
25-
exclude group: 'org.springframework', module:'spring-context'
26-
exclude group: 'org.springframework', module:'spring-web'
27-
exclude group: 'org.springframework', module:'spring-beans'
28-
exclude group: 'org.springframework', module:'spring-tx'
29-
exclude group: 'org.slf4j', module:'jcl-over-slf4j'
30-
exclude group: 'org.slf4j', module:'jul-to-slf4j'
31-
exclude group: 'org.slf4j', module:'slf4j-api'
32-
exclude group: 'org.slf4j', module:'slf4j-simple'
33-
exclude group: 'org.graceframework', module:'grace-bootstrap'
34-
exclude group: 'org.graceframework', module:'grace-plugin-domain-class'
35-
exclude group: 'org.graceframework', module:'grace-core'
36-
exclude group: 'org.graceframework', module:'grace-web'
37-
exclude group: 'org.graceframework', module:'grace-test'
38-
exclude group: 'org.graceframework', module:'grace-async'
39-
exclude group: 'org.graceframework', module:'grace-spring'
40-
exclude group: 'commons-collections', module:'commons-collections'
41-
exclude group: 'commons-lang', module:'commons-lang'
42-
exclude group: 'javassit', module:'javassist'
43-
exclude group: 'java-persistence', module:'persistence-api'
44-
exclude group: 'javassist', module: 'javassist'
45-
}
4618

4719
api libs.tomcat.jdbc
4820
testRuntimeOnly libs.h2
@@ -54,22 +26,30 @@ dependencies {
5426
test {
5527
maxParallelForks = 2
5628
forkEvery = isCiBuild ? 25 : 100
57-
if(!isCiBuild) {
29+
if (!isCiBuild) {
5830
maxHeapSize = '2048m'
5931
}
60-
excludes = ['**/GrailsDomainBinderTests.class',
61-
'**/ComponentValidationTests.class',
62-
'**/HibernateMappingUniqueConstraintTests.class']
32+
33+
excludes = [
34+
'**/GrailsDomainBinderTests.class',
35+
'**/ComponentValidationTests.class',
36+
'**/HibernateMappingUniqueConstraintTests.class'
37+
]
6338
}
6439

65-
task testGrailsDomainBinder(type: Test) { includes = [
40+
task testGrailsDomainBinder(type: Test) {
41+
includes = [
6642
'**/GrailsDomainBinderTests.class'
6743
]
6844
}
6945

7046
task testIsolatedPersistentOne(type: Test) {
71-
includes = ['**/ComponentValidationTests.class']
72-
includes = ['**/HibernateMappingUniqueConstraintTests.class']
47+
includes = [
48+
'**/ComponentValidationTests.class',
49+
'**/HibernateMappingUniqueConstraintTests.class'
50+
]
7351
}
7452

75-
test.dependsOn testGrailsDomainBinder, testIsolatedPersistentOne
53+
test {
54+
dependsOn = [testGrailsDomainBinder, testIsolatedPersistentOne]
55+
}

grace-test-suite-uber/build.gradle

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,49 +13,25 @@ dependencies {
1313

1414
testImplementation project(":grace-boot")
1515
testImplementation project(":grace-plugin-codecs")
16-
testImplementation project(":grace-plugin-domain-class")
17-
testImplementation project(":grace-plugin-url-mappings")
16+
testImplementation project(":grace-plugin-databinding")
1817
testImplementation project(":grace-plugin-datasource")
19-
testImplementation project(":grace-plugin-services")
20-
testImplementation project(":grace-plugin-rest")
18+
testImplementation project(":grace-plugin-domain-class")
19+
testImplementation project(":grace-plugin-gsp")
2120
testImplementation project(":grace-plugin-i18n")
22-
testImplementation project(":grace-plugin-databinding")
21+
testImplementation project(":grace-plugin-rest")
22+
testImplementation project(":grace-plugin-services")
23+
testImplementation project(":grace-plugin-url-mappings")
2324
testImplementation project(":grace-spring")
2425
testImplementation project(":grace-test-support")
25-
testImplementation libs.grace.datastore.gorm.hibernate, {
26-
exclude group: 'org.graceframework', module:'grace-datastore-gorm'
27-
exclude group: 'org.graceframework', module:'grace-datastore-core'
28-
exclude group: 'org.springframework', module:'spring-core'
29-
exclude group: 'org.springframework', module:'spring-context'
30-
exclude group: 'org.springframework', module:'spring-web'
31-
exclude group: 'org.springframework', module:'spring-beans'
32-
exclude group: 'org.springframework', module:'spring-tx'
33-
exclude group: 'org.slf4j', module:'jcl-over-slf4j'
34-
exclude group: 'org.slf4j', module:'jul-to-slf4j'
35-
exclude group: 'org.slf4j', module:'slf4j-api'
36-
exclude group: 'org.slf4j', module:'slf4j-simple'
37-
exclude group: 'org.graceframework', module:'grace-bootstrap'
38-
exclude group: 'org.graceframework', module:'grace-plugin-domain-class'
39-
exclude group: 'org.graceframework', module:'grace-core'
40-
exclude group: 'org.graceframework', module:'grace-web'
41-
exclude group: 'org.graceframework', module:'grace-test'
42-
exclude group: 'org.graceframework', module:'grace-async'
43-
exclude group: 'org.graceframework', module:'grace-spring'
44-
exclude group: 'commons-collections', module:'commons-collections'
45-
exclude group: 'commons-lang', module:'commons-lang'
46-
exclude group: 'javassit', module:'javassist'
47-
exclude group: 'java-persistence', module:'persistence-api'
48-
exclude group: 'javassist', module: 'javassist'
49-
}
5026
testImplementation libs.grace.async.core
51-
testImplementation project(":grace-plugin-gsp")
27+
testImplementation libs.grace.datastore.gorm
5228

53-
testRuntimeOnly libs.h2
5429
testRuntimeOnly libs.aspectj.rt
5530
testRuntimeOnly libs.aspectj.weaver
31+
testRuntimeOnly libs.h2
32+
testRuntimeOnly libs.jakarta.el
5633
testRuntimeOnly libs.jakarta.servlet.jsp
5734
testRuntimeOnly libs.jakarta.servlet.jsp.jstl
58-
testRuntimeOnly libs.jakarta.el
5935
testRuntimeOnly libs.spring.aspects
6036
}
6137

grace-test-suite-web/build.gradle

Lines changed: 11 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,67 +4,37 @@ configurations.all {
44
}
55
}
66

7-
configurations.testCompileClasspath {
8-
exclude module: "grails-plugin-testing"
9-
}
10-
117
dependencies {
128
testImplementation project(":grace-boot")
13-
testImplementation project(":grace-test-suite-base")
14-
testImplementation project(":grace-plugin-domain-class")
159
testImplementation project(":grace-plugin-codecs")
10+
testImplementation project(":grace-plugin-controllers")
1611
testImplementation project(":grace-plugin-converters")
12+
testImplementation project(":grace-plugin-databinding")
1713
testImplementation project(":grace-plugin-datasource")
14+
testImplementation project(":grace-plugin-domain-class")
15+
testImplementation project(":grace-plugin-gsp")
1816
testImplementation project(":grace-plugin-i18n")
19-
testImplementation project(":grace-plugin-url-mappings")
20-
testImplementation project(":grace-plugin-databinding")
21-
testImplementation project(":grace-plugin-services")
2217
testImplementation project(":grace-plugin-interceptors")
23-
testImplementation project(":grace-plugin-controllers")
2418
testImplementation project(":grace-plugin-rest")
19+
testImplementation project(":grace-plugin-services")
20+
testImplementation project(":grace-plugin-url-mappings")
2521
testImplementation project(":grace-web")
2622
testImplementation project(":grace-spring")
23+
testImplementation project(":grace-test-suite-base")
2724
testImplementation project(":grace-test-support")
2825

2926
api libs.jakarta.servlet
27+
testImplementation libs.glassfish.web.jsp.jstl
28+
testImplementation libs.grace.async.core
29+
testImplementation libs.grace.datastore.gorm
3030
testImplementation libs.jakarta.el
3131
testImplementation libs.jakarta.servlet.jsp
3232
testImplementation libs.jakarta.servlet.jsp.jstl
3333
testImplementation libs.jakarta.servlet.jsp.jstl
34-
testImplementation libs.glassfish.web.jsp.jstl
35-
36-
testImplementation libs.grace.datastore.gorm.hibernate, {
37-
exclude group: 'org.graceframework', module:'grace-datastore-gorm'
38-
exclude group: 'org.graceframework', module:'grace-datastore-core'
39-
exclude group: 'org.springframework', module:'spring-core'
40-
exclude group: 'org.springframework', module:'spring-context'
41-
exclude group: 'org.springframework', module:'spring-web'
42-
exclude group: 'org.springframework', module:'spring-beans'
43-
exclude group: 'org.springframework', module:'spring-tx'
44-
exclude group: 'org.slf4j', module:'jcl-over-slf4j'
45-
exclude group: 'org.slf4j', module:'jul-to-slf4j'
46-
exclude group: 'org.slf4j', module:'slf4j-api'
47-
exclude group: 'org.slf4j', module:'slf4j-simple'
48-
exclude group: 'org.graceframework', module:'grace-bootstrap'
49-
exclude group: 'org.graceframework', module:'grace-plugin-domain-class'
50-
exclude group: 'org.graceframework', module:'grace-core'
51-
exclude group: 'org.graceframework', module:'grace-web'
52-
exclude group: 'org.graceframework', module:'grace-test'
53-
exclude group: 'org.graceframework', module:'grace-async'
54-
exclude group: 'org.graceframework', module:'grace-spring'
55-
exclude group: 'commons-collections', module:'commons-collections'
56-
exclude group: 'commons-lang', module:'commons-lang'
57-
exclude group: 'javassit', module:'javassist'
58-
exclude group: 'java-persistence', module:'persistence-api'
59-
exclude group: 'javassist', module: 'javassist'
60-
}
61-
62-
testImplementation project(":grace-plugin-gsp")
63-
testImplementation libs.grace.async.core
6434

65-
testRuntimeOnly libs.spring.aspects
6635
testRuntimeOnly libs.aspectj.rt
6736
testRuntimeOnly libs.aspectj.weaver
37+
testRuntimeOnly libs.spring.aspects
6838
}
6939

7040
// javaee-web-api has a bad versions of classes we need to compile against

grace-test-support/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ dependencies {
88
api project(":grace-plugin-rest")
99
api project(":grace-test")
1010

11-
api libs.grace.async.core
1211
api project(":grace-plugin-gsp")
1312
api project(":grace-plugin-taglibs")
1413
api project(":grace-views-json")
1514
api project(":grace-web-gsp")
16-
api libs.groovy.test.junit5
15+
api libs.grace.async.core
1716
api libs.grace.datastore.gorm
1817
api libs.grace.datastore.gorm.support
1918
api libs.grace.datastore.gorm.test
19+
api libs.groovy.test.junit5
2020
api libs.junit.jupiter.api
2121
api libs.junit.platform.runner
22-
api libs.javassist
2322
api libs.jakarta.servlet
24-
api libs.spring.test
25-
api libs.spring.boot.test
23+
api libs.javassist
2624
api libs.spock.core
2725
api libs.spock.spring
26+
api libs.spring.boot.test
27+
api libs.spring.test
2828
runtimeOnly libs.junit.jupiter.engine
2929
}

0 commit comments

Comments
 (0)