-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
245 lines (200 loc) · 9.74 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
import java.text.SimpleDateFormat
version = '3.4.19'
group = 'de.laser'
// ---[ build script ]---
buildscript {
repositories {
mavenLocal()
maven { url = 'https://repo.grails.org/grails/core' }
}
dependencies {
classpath 'org.grails:grails-gradle-plugin:' + grailsGradlePluginVersion // 2024
classpath 'org.grails.plugins:hibernate5:' + gormVersion // 2024
classpath 'org.grails.plugins:database-migration:' + databaseMigrationVersion // 2024
classpath 'com.bertramlabs.plugins:asset-pipeline-gradle:' + assetPipelineGradleVersion // 2024 : [freeze] 4.5.* fails
classpath 'com.gorylenko.gradle-git-properties:gradle-git-properties:2.4.2' // 2024
classpath 'com.github.ben-manes:gradle-versions-plugin:0.51.0' // 2024
// -- dependency resolving issue
classpath 'org.grails:grails-shell:6.1.2' // 2024 : + org.grails.plugins:database-migration
classpath 'org.quartz-scheduler:quartz:2.4.0' // 2024
}
}
// ---[ applying plugins ]---
apply plugin: 'idea'
apply plugin: 'war'
apply plugin: 'org.grails.grails-web'
apply plugin: 'org.grails.grails-gsp'
apply plugin: 'com.bertramlabs.asset-pipeline'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'com.gorylenko.gradle-git-properties'
// ---[ plugin: database migration ! before dependencies configuration ]---
sourceSets {
main {
resources { srcDir 'grails-app/migrations' }
}
}
// ---[ config ]---
repositories {
mavenLocal()
maven { url = 'https://repo.grails.org/grails/core' }
}
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
exclude group: 'org.grails', module: 'grails-shell' // - org.grails.plugins:database-migration (exclude)
}
}
dependencies {
developmentOnly 'org.springframework.boot:spring-boot-devtools'
developmentOnly 'org.springframework.boot:spring-boot-starter-tomcat'
compileOnly 'io.micronaut:micronaut-inject-groovy'
console 'org.grails:grails-console'
implementation 'org.springframework.boot:spring-boot-autoconfigure'
implementation 'org.springframework.boot:spring-boot-starter-logging'
implementation 'org.springframework.boot:spring-boot-starter-validation'
// implementation 'org.springframework.boot:spring-boot-starter-websocket'
implementation 'org.grails:grails-core'
implementation 'org.grails:grails-logging'
implementation 'org.grails:grails-plugin-databinding'
implementation 'org.grails:grails-plugin-i18n'
implementation 'org.grails:grails-plugin-interceptors'
implementation 'org.grails:grails-plugin-rest'
implementation 'org.grails:grails-plugin-services'
implementation 'org.grails:grails-plugin-url-mappings'
implementation 'org.grails:grails-web-boot'
implementation 'org.grails.plugins:async'
implementation 'org.grails.plugins:cache'
implementation 'org.grails.plugins:events'
implementation 'org.grails.plugins:gsp'
implementation 'org.grails.plugins:hibernate5:' + gormVersion
implementation 'org.grails.plugins:scaffolding'
implementation 'io.micronaut:micronaut-http-client'
// --------------------------------------------------
implementation 'org.elasticsearch:elasticsearch:' + elasticsearchVersion // 2024
implementation 'org.elasticsearch.client:elasticsearch-rest-high-level-client:' + elasticsearchVersion // 2024
implementation 'org.grails:grails-shell:6.1.2' // 2024 : + org.grails.plugins:database-migration
implementation 'org.grails.plugins:audit-logging:4.0.3' // 2021
implementation 'org.grails.plugins:database-migration:' + databaseMigrationVersion, { // 2024
exclude module: 'spring-boot-cli'
}
implementation 'org.grails.plugins:grails-executor:0.4' // 2016 : [deprecated]
implementation 'org.grails.plugins:mail:3.0.0' // 2021
implementation 'org.grails.plugins:quartz:3.0.0' // 2024
implementation 'org.grails.plugins:spring-security-core:6.1.2' // 2024
implementation 'org.grails.plugins:wkhtmltopdf:1.0.0.RC9' // 2018
implementation 'org.hibernate:hibernate-core:' + hibernateVersion // 2023
implementation 'org.hibernate:hibernate-ehcache:' + hibernateVersion // 2023 : + org.hibernate:hibernate-core:5.6.15.Final
implementation 'net.sf.ehcache:ehcache:2.10.9.2' // 2021
// implementation 'org.hibernate:hibernate-jcache:' + hibernateVersion // replacement for hibernate-ehcache:5.6.14.Final
// implementation 'org.ehcache:ehcache:3.10.8' // replacement for net.sf.ehcache:ehcache:2.10.9.2
implementation 'commons-io:commons-io:2.18.0' // 2024
implementation 'com.github.albfernandez:juniversalchardet:2.5.0' // 2024
implementation 'com.vladsch.flexmark:flexmark:' + flexmarkVersion // 2023
implementation 'com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:' + flexmarkVersion // 2023
implementation 'com.vladsch.flexmark:flexmark-ext-tables:' + flexmarkVersion // 2023
implementation 'io.github.gpc:asynchronous-mail:3.1.2' // 2023
implementation 'org.apache.commons:commons-lang3:3.17.0' // 2024
implementation 'org.apache.poi:poi-ooxml:3.17' // 2017 : [freeze] : 5.x available
implementation 'org.codehaus.gpars:gpars:1.2.1' // 2014
implementation 'org.codehaus.janino:janino:3.1.12' // 2024 : logback
implementation 'org.liquibase:liquibase-core:4.19.0' // 2023 : + org.grails.plugins:database-migration // [freeze - not 4.19.1]
implementation 'org.quartz-scheduler:quartz:2.4.0' // 2024
// --------------------------------------------------
runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-gradle:' + assetPipelineGradleVersion // 2024 : [freeze - not 4.5.*] -- JS Closure uglify JS Exception
runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-core:4.5.2' // 2024 -- java.lang.ClassNotFoundException: org.graalvm.polyglot.Context
runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails:4.5.2' // 2024 -- No such property: asset for class: de.laser.system.AssetsTagLib
runtimeOnly 'javax.xml.bind:jaxb-api:2.3.1' // 2018 : [freeze]
runtimeOnly 'org.apache.tomcat:tomcat-jdbc'
runtimeOnly 'org.graalvm.sdk:graal-sdk:22.0.0.2' // + com.bertramlabs.plugins:asset-pipeline-core [freeze]
runtimeOnly 'org.postgresql:postgresql:42.7.5' // 2025
}
java {
sourceCompatibility = JavaVersion.toVersion('11')
targetCompatibility = JavaVersion.toVersion('11')
}
springBoot {
mainClass = 'de.laser.Application'
}
bootRun {
ignoreExitValue = true
jvmArgs(
'-Dspring.output.ansi.enabled=always',
'-noverify',
'-XX:TieredStopAtLevel=1',
'-Xmx1024m')
sourceResources sourceSets.main
String springProfilesActive = 'spring.profiles.active'
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}
// ---[ plugin: gradle-git-properties ]---
gitProperties {
dateFormat = "dd-MM-yyyy'T'HH:mm:ssZ"
//dateFormatTimeZone = "PST"
gitPropertiesDir = new File("${project.rootDir}/")
}
// ---[ war ]---
tasks.register('war.updateBuildInfo', Task) {
group = 'laser'
String rootDir = project.rootDir
String buildDir = project.buildDir
doFirst {
Properties properties = new Properties()
properties.setProperty('info.app.build.date', new SimpleDateFormat('dd.MM.yyyy HH:mm').format(new Date()))
properties.setProperty('info.app.build.host', InetAddress.localHost.hostName)
properties.setProperty('info.app.build.javaVersion', System.getProperty('java.version'))
try {
File gitProperties = new File("${rootDir}/git.properties")
gitProperties.withInputStream { properties.load(it) } // read props from file
File grailsBuildInfo = new File("${buildDir}/resources/main/META-INF/grails.build.info")
grailsBuildInfo.withInputStream { properties.load(it) } // read props from file
grailsBuildInfo.withOutputStream { properties.store(it, null) } // write back to file
}
catch (Exception e) {
}
}
}
war {
enabled = true
archiveBaseName = 'laser3'
archiveFileName = 'laser3.war'
duplicatesStrategy = DuplicatesStrategy.WARN
rootSpec.exclude(
// '**/h2-*.jar',
'**/groovy-groovydoc-*.jar'
)
dependsOn compileGroovyPages
dependsOn 'war.updateBuildInfo'
}
// ---[ plugin: asset pipeline ]---
assets {
minifyJs = true
minifyCss = true
minifyOptions = [
languageMode: 'ES6',
targetLanguage: 'ES5_STRICT'
]
skipNonDigests = true
maxThreads = 8
from '/themes'
excludes = [
// images/*
// javascripts/*
'libs/**',
'modules/**',
// themes/*
'accessibility/**',
'javascript/**',
'laser/**',
// vendor/*
'crypto-js-4.1.1/**',
'echarts/**',
'spring-websocket/**', // tmp deactivated
'swagger-ui/**'
]
}
// ---[ gradle tasks ]---
apply from: 'laserTasks.gradle'
tasks.withType(GroovyCompile).configureEach {
configure(groovyOptions) { forkOptions.jvmArgs = ['-Xmx1024m'] }
}