-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathbuild.gradle
106 lines (94 loc) · 2.91 KB
/
build.gradle
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
/*
* Copyright 2013, The Thymeleaf Project (http://www.thymeleaf.org/)
*
* Licensed 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
*
* http://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.
*/
/**
* Gradle build script to perform a variety of support tasks for the Thymeleaf
* Extras Eclipse Plugin project.
*
* @author Emanuel Rabina
*/
plugins {
id 'java-library'
}
apply from: 'https://raw.githubusercontent.com/ultraq/gradle-support/4.3.1/jaxb.gradle'
def contentassistPluginDir = 'org.thymeleaf.extras.eclipse.contentassist'
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
/**
* Create the depdendency graphs for each of the plugins. This is used for the
* 'downloadDependencies' task so it can copy all necessary JARs into each
* project, saving us having to store those JARs in source control (like we used
* to, since this is an OSGi environment, not a Maven one).
*/
configurations.create('contentassist')
//configurations.all {
// resolutionStrategy {
// cacheChangingModulesFor 0, 'seconds'
// cacheDynamicVersionsFor 0, 'seconds'
// }
//}
def groovyVersion = '4.0.15'
def springVersion = '6.0.13'
dependencies {
contentassist(
'jakarta.annotation:jakarta.annotation-api:2.1.1',
'jakarta.inject:jakarta.inject-api:2.0.0',
'nz.net.ultraq.jaxb:jaxb-utilities:3.0.0',
'nz.net.ultraq.groovy:groovy-extensions:2.2.0',
'nz.net.ultraq.groovy:groovy-profiling-extensions:0.8.0',
'org.attoparser:attoparser:2.0.7.RELEASE',
"org.apache.groovy:groovy:${groovyVersion}",
"org.springframework:spring-context:${springVersion}",
// For unit tests
"org.apache.groovy:groovy-xml:${groovyVersion}",
'org.junit.jupiter:junit-jupiter:5.7.2',
'org.mockito:mockito-core:3.12.4',
"org.springframework:spring-test:${springVersion}"
)
}
tasks.named('clean') {
delete "${contentassistPluginDir}/lib"
}
/**
* Download the dependencies for each plugin and place them into their
* respective libs directories.
*/
tasks.register('downloadDependencies') {
description = 'Download Maven dependencies into the lib directory for each plugin'
doLast {
copy {
from configurations.contentassist
into "${contentassistPluginDir}/lib"
}
}
}
/**
* Configure the XJC task to generate Java classes from the dialect help schema
* in the core plugin.
*/
xjc {
schemaDir = "${contentassistPluginDir}/schemas"
outputDir = "${contentassistPluginDir}/src/main/java"
classes = [
'**/dialect/xml/*.java'
]
args = [
'-Xinject-code'
]
}