-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
205 lines (161 loc) · 7.26 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
version "2.0.5"
group "wekb"
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.4.7"
classpath 'org.grails.plugins:hibernate5:7.3.0'
//NOT DEFAULT
classpath "org.grails.plugins:database-migration:4.1.0"
classpath "com.gorylenko.gradle-git-properties:gradle-git-properties:2.4.1"
classpath 'org.quartz-scheduler:quartz:2.3.2'
}
}
apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"war"
apply plugin:"org.grails.grails-web"
apply plugin:"org.grails.grails-gsp"
apply plugin:"com.bertramlabs.asset-pipeline"
//NOT DEFAULT
apply plugin:"com.gorylenko.gradle-git-properties"
// ---[ plugin: database migration ! before dependencies configuration ]---
sourceSets {
main {
resources { srcDir 'grails-app/migrations' }
}
}
repositories {
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
}
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
dependencies {
developmentOnly("org.springframework.boot:spring-boot-devtools")
developmentOnly "org.springframework.boot:spring-boot-starter-tomcat" // implementation
compileOnly "io.micronaut:micronaut-inject-groovy"
console "org.grails:grails-console"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-starter-validation"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.grails:grails-core"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.grails:grails-web-boot"
implementation "org.grails:grails-logging"
implementation "org.grails:grails-plugin-rest"
implementation "org.grails:grails-plugin-databinding"
implementation "org.grails:grails-plugin-i18n"
implementation "org.grails:grails-plugin-services"
implementation "org.grails:grails-plugin-url-mappings"
implementation "org.grails:grails-plugin-interceptors"
implementation "org.grails.plugins:cache"
implementation "org.grails.plugins:async"
implementation "org.grails.plugins:scaffolding"
implementation "org.grails.plugins:events"
implementation 'org.grails.plugins:hibernate5'
implementation "org.grails.plugins:gsp"
profile "org.grails.profiles:web"
implementation "com.bertramlabs.plugins:asset-pipeline-grails:3.4.7"
//NO DEFAULT dependencies
implementation 'org.elasticsearch:elasticsearch:7.16.3' // 2022
implementation 'org.elasticsearch.client:elasticsearch-rest-high-level-client:7.16.3' // 2022
implementation 'org.grails.plugins:spring-security-core:5.1.1' // 2022
implementation 'org.grails.plugins:audit-logging:4.0.3' // 2021
implementation 'org.grails.plugins:database-migration:4.1.0', { // 2022
exclude module: 'spring-boot-cli'
}
implementation 'org.grails.plugins:grails-executor:0.4' // 2016 : [deprecated]
implementation 'org.grails.plugins:mail:3.0.0' // 2021 : upgrade from 2.0.0
implementation 'org.grails.plugins:quartz:2.0.13' // 2019
implementation 'org.hibernate:hibernate-core:5.6.14.Final' // 2022
implementation 'org.hibernate:hibernate-ehcache:5.6.14.Final' // 2022 : + org.hibernate:hibernate-core:5.6.14.Final
implementation 'net.sf.ehcache:ehcache:2.10.9.2' // 2021
implementation 'com.github.albfernandez:juniversalchardet:2.4.0' // 2020
implementation group: "org.apache.poi", name: "poi-ooxml", version: "5.0.0"
implementation 'org.codehaus.gpars:gpars:1.2.1' // 2014
implementation 'org.codehaus.janino:janino:3.1.9' // 2022 : logback
implementation 'org.liquibase:liquibase-core:4.11.0' // 2022 : + org.grails.plugins:database-migration
implementation 'org.quartz-scheduler:quartz:2.3.2' // 2019
// https://mvnrepository.com/artifact/org.grails.plugins/grails-melody-plugin
//not supported in Grails 5
//implementation 'org.grails.plugins:grails-melody-plugin:1.80.0' // 2019
implementation group: 'org.codehaus.groovy.modules.http-builder', name: 'http-builder', version: '0.7.1'
implementation 'dk.glasius:external-config:3.1.1'
// --------------------------------------------------
runtimeOnly 'org.apache.tomcat:tomcat-jdbc'
runtimeOnly 'javax.xml.bind:jaxb-api:2.3.1' // 2018 : [?]
runtimeOnly 'org.postgresql:postgresql:42.5.1' // 2022
// https://mvnrepository.com/artifact/commons-net/commons-net
implementation group: 'commons-net', name: 'commons-net', version: '3.9.0' //2022 -> for FTP
/*implementation 'org.apache.tika:tika-core:2.9.1' // for detect encoding in files
implementation 'org.apache.tika:tika-parsers-standard-package:2.9.1'*/
}
bootRun {
ignoreExitValue true
jvmArgs(
'-Dspring.output.ansi.enabled=always',
'-noverify',
'-XX:TieredStopAtLevel=1',
'-Xmx2g')
sourceResources sourceSets.main
String springProfilesActive = 'spring.profiles.active'
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}
tasks.withType(GroovyCompile) {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Xmx1024m']
}
}
assets {
minifyJs = true
minifyCss = true
}
buildProperties.doLast {
// Find the right file
File grailsBuildInfoFile = (File)it.outputs.files.files.find { it.name == 'grails.build.info' }
File grailsGitInfoFile = file("$buildDir/resources/main/git.properties")
if(!grailsBuildInfoFile) {
println "Build file not found!"
return // No need to continue if the file is not there
}
Properties properties = new Properties()
Properties gitProperties = new Properties()
// Read properties from the file
grailsBuildInfoFile.withInputStream {
properties.load(it)
}
if (!grailsGitInfoFile) {
println "Git file not found!"
}else {
grailsGitInfoFile.withInputStream {
gitProperties.load(it)
}
}
// Add new properties from various sources
properties.setProperty('build.time', new Date().format("yyyy-MM-dd HH:mm:ss"))
// Get a System property
properties.setProperty('build.java.version', System.getProperty('java.version'))
// Get the host name where the build was created
// properties.setProperty('build.host', InetAddress.localHost.hostName)
if(grailsGitInfoFile) {
properties.setProperty('build.git.revision', gitProperties.getProperty('git.commit.id.abbrev'))
properties.setProperty('build.git.branch', gitProperties.getProperty('git.branch'))
}
// Write the properties back to the file
grailsBuildInfoFile.withOutputStream {
properties.store(it,null)
}
}
war {
baseName = 'wekb'
archiveName = 'wekb.war'
}