-
-
Notifications
You must be signed in to change notification settings - Fork 969
Expand file tree
/
Copy pathbuild.gradle
More file actions
116 lines (99 loc) · 3.75 KB
/
build.gradle
File metadata and controls
116 lines (99 loc) · 3.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
plugins {
id 'groovy'
id 'java-library'
id 'maven-publish'
}
version = '0.0.1'
group = 'org.apache.grails'
configurations {
// Required to keep Gradle classes off the test compile classpath.
gradleConf.extendsFrom compileClasspath
}
apply {
from project.layout.projectDirectory.file('../../dependencies.gradle')
}
dependencies {
gradleConf gradleApi()
// grails-docs classes are used in Gradle builds,
// so we must compile with Groovy 3 until Gradle upgrades to Groovy 4.
compileOnly "org.codehaus.groovy:groovy:${GroovySystem.version}"
compileOnly "org.codehaus.groovy:groovy-ant:${GroovySystem.version}"
api "org.apache.commons:commons-text:${gradleBomDependencyVersions['commons-text.version']}"
api "org.apache.ant:ant:${gradleBomDependencyVersions['ant.version']}"
api 'org.grails:grails-gdoc-engine:1.0.1'
api 'org.yaml:snakeyaml:2.4'
api "org.asciidoctor:asciidoctorj:${gradleBomDependencyVersions['asciidoctorj.version']}"
implementation "org.springframework.boot:spring-boot-gradle-plugin:${gradleBomDependencyVersions['spring-boot.version']}"
testImplementation platform("org.spockframework:spock-bom:${gradleBomDependencyVersions['gradle-spock.version']}")
testImplementation('org.spockframework:spock-core') {
transitive = false
}
testImplementation "org.codehaus.groovy:groovy-test-junit5:${GroovySystem.version}"
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.12.2'
testImplementation 'org.junit.platform:junit-platform-suite:1.12.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.12.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.12.2'
}
sourceSets {
main {
compileClasspath = configurations.gradleConf
}
}
def docFilesJar = tasks.register('docFilesJar', Jar)
docFilesJar.configure {Jar it ->
it.description = 'Package up files used for generating documentation.'
it.archiveVersion = null
it.archiveFileName = 'grails-doc-files.jar'
it.from 'src/main/template'
}
tasks.named('jar', Jar).configure { Jar it ->
it.from docFilesJar
}
jar.dependsOn docFilesJar
def java17moduleReflectionCompatibilityArguments = [
'--add-opens=java.base/java.lang=ALL-UNNAMED',
'--add-opens=java.base/java.util=ALL-UNNAMED'
]
tasks.withType(Test).configureEach {
onlyIf {
![
'onlyFunctionalTests',
'onlyHibernate5Tests',
'onlyMongodbTests',
'skipCoreTests',
'skipTests'
].find {
project.hasProperty(it)
}
}
useJUnitPlatform()
jvmArgs += java17moduleReflectionCompatibilityArguments
testLogging {
events('passed', 'skipped', 'failed')
showExceptions = true
exceptionFormat = 'full'
showCauses = true
showStackTraces = true
}
excludes = ['**/*TestCase.class', '**/*$*.class']
maxParallelForks = 1
maxHeapSize = '1024m'
}