forked from k-int/web-toolkit-ce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
214 lines (179 loc) · 6.1 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
//configurations.all {
// resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
//}
buildscript {
repositories {
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
maven { url "https://repo.grails.org/artifactory/core" }
maven { url "http://maven.k-int.com/content/repositories/releases" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "org.grails.plugins:hibernate5:${gormHibernate-".RELEASE"}"
classpath "org.grails.plugins:views-gradle:2.0.4"
classpath "com.k_int.gradle:kint-gradle-plugin:2.1.3"
}
}
plugins {
id 'antlr'
}
group "com.k_int.grails"
apply plugin: "eclipse"
apply plugin: "maven"
apply plugin: "org.grails.grails-plugin"
apply plugin: "org.grails.grails-plugin-publish"
apply plugin: "org.grails.plugins.views-json"
apply plugin: "com.k_int.gradle.plugin"
apply plugin: "com.k_int.gradle.conventional-git"
repositories {
// mavenLocal()
mavenCentral()
maven { url 'https://repo.grails.org/grails/core' }
maven { url 'https://maven.indexdata.com/' }
maven { url "https://maven.k-int.com/content/repositories/public" }
maven { url "https://dl.bintray.com/grails/plugins" }
}
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
sourceSets {
main {
resources {
srcDir 'src/migrations'
}
}
}
// AST Sources.
//sourceSets {
// ast {
// groovy.srcDirs = ['src/ast/groovy']
// }
//}
dependencies {
provided "org.springframework.boot:spring-boot-starter-logging"
provided "org.springframework.boot:spring-boot-autoconfigure"
provided "org.grails:grails-core"
provided "org.springframework.boot:spring-boot-starter-undertow"
provided "org.grails:grails-plugin-url-mappings"
provided "org.grails:grails-plugin-rest"
provided "org.grails:grails-plugin-codecs"
provided "org.grails:grails-plugin-interceptors"
provided "org.grails:grails-plugin-services"
provided "org.grails:grails-plugin-datasource"
provided "org.grails:grails-web-boot"
provided "org.grails:grails-logging"
provided "org.grails.plugins:hibernate5"
compile "org.hibernate:hibernate-core:5.4.18.Final"
compile "org.grails.plugins:views-json"
provided "org.grails:grails-plugin-databinding"
compileOnly "io.micronaut:micronaut-inject-groovy"
console "org.grails:grails-console"
profile "org.grails.profiles:rest-api-plugin"
provided "javax.xml.bind:jaxb-api:2.3.1"
provided "org.grails:grails-gorm-testing-support"
provided "org.grails:grails-web-testing-support"
// testCompile "io.micronaut:micronaut-http-client:1.0.3"
provided "org.postgresql:postgresql:42.2.14"
compile 'com.amazonaws:aws-java-sdk-s3:1.12.68'
compile 'com.ibm.icu:icu4j:62.1'
provided 'org.springframework.security:spring-security-web:5.1.8.RELEASE'
compile 'io.github.http-builder-ng:http-builder-ng-core:1.0.4'
testRuntime "org.seleniumhq.selenium:selenium-api:3.14.0"
testRuntime "org.postgresql:postgresql:42.2.23"
testRuntime "org.grails.plugins:geb"
testRuntime 'com.h2database:h2:2.1.212'
// Minio for file storage to S3
compile "io.minio:minio:8.3.3"
compile 'com.squareup.okhttp3:okhttp:4.8.1'
compile 'org.jetbrains.kotlin:kotlin-stdlib:1.3.70'
antlr "org.antlr:antlr4:4.7" // use ANTLR version 4
}
sourceSets {
main {
resources {
srcDir 'src/migrations'
}
}
}
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)
}
tasks.withType(GroovyCompile) {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Xmx1024m']
}
}
// enable if you wish to package this plugin as a standalone application
bootJar.enabled = false
//compileGsonViews {
// packageName = "web-toolkit"
//}
// Writes plugin data
tasks.register("extendedConfigScript") { Task me ->
// Find the correct file.
Task configTask = project.tasks.getByName('configScript')
File configFile = configTask.outputs.files.files.find { it.name == 'config.groovy' }
if(!configFile) {
return // No need to continue if the file is not there
}
me.inputs.property('version', project.version)
me.outputs.file(configFile)
project.tasks.getByName('compileGroovy').dependsOn( me )
me.dependsOn( configTask )
doLast {
configFile.append("""
/***** Extention *****/
withConfig(configuration) {
inline(phase: 'CONVERSION') { source, context, classNode ->
classNode.putNodeMetaData('projectVersion', '$project.version')
}
}""")
}
}
import org.gradle.plugins.ide.eclipse.model.ClasspathEntry
eclipse {
autoBuildTasks ([':processResources', ':generateGrammarSource'])
synchronizationTasks ([':processResources', ':generateGrammarSource'])
classpath {
defaultOutputDir = new File(project.buildDir.canonicalPath, 'main')
file {
whenMerged { classpath ->
Set<String> resources = sourceSets.main?.resources?.srcDirs?.collect { it.canonicalPath }
entries.collect().each {
if (it.path =='grails-app/conf' && it.output?.toLowerCase().endsWith('test')) {
classpath.entries.remove( it )
println "Removed ${it}"
return
}
if (it.hasProperty('output') && it.output.startsWith('bin/')) {
it.output = 'build/' + it.output.substring(4)
}
// Eclude the output of the resources added to the source sets for grails.
// Instead we add the results of the 'processResources' tasks to the classpath later.
if (it.hasProperty('dir') && resources.find { res -> it.dir?.canonicalPath?.startsWith(res) } ) {
it.exported = false
it.excludes << '**/*'
}
}
def lib = new org.gradle.plugins.ide.eclipse.model.Library(fileReference(file("${tasks.processResources.destinationDir}")))
println "Adding: ${lib}"
entries << lib
}
}
}
}
compileGsonViews {
packageName = "web-toolkit"
}