-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
180 lines (154 loc) · 6.42 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
buildscript {
repositories {
mavenCentral()
maven {url 'https://plugins.gradle.org/m2/'}
maven {url 'https://repo.grails.org/grails/core'}
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "org.grails.plugins:hibernate5:$grailsHibernatePluginVersion"
}
}
version xhReleaseVersion
group 'io.xh'
apply plugin:'idea'
apply plugin:'org.grails.grails-plugin'
apply plugin:'java-library'
repositories {
mavenCentral()
maven {url 'https://repo.grails.org/grails/core'}
}
dependencies {
//-------------------------------------------------------
// Grails 5.0 REST Plugin Defaults + Other Grails Plugins
//-------------------------------------------------------
profile "org.grails.profiles:rest-api-plugin"
api "org.springframework.boot:spring-boot-starter-logging"
api "org.springframework.boot:spring-boot-autoconfigure"
api "org.grails:grails-core"
api "org.springframework.boot:spring-boot-starter-actuator"
api "org.springframework.boot:spring-boot-starter-tomcat"
api "org.grails:grails-plugin-url-mappings"
api "org.grails:grails-plugin-rest"
api "org.grails:grails-plugin-codecs"
api "org.grails:grails-plugin-interceptors"
api "org.grails:grails-plugin-services"
api "org.grails:grails-plugin-datasource"
api "org.grails:grails-plugin-databinding"
api "org.grails:grails-plugin-domain-class"
api "org.grails:grails-web-boot"
api "org.grails:grails-logging"
api "org.grails.plugins:async"
api "org.grails.plugins:hibernate5"
api "org.grails.plugins:events"
api "org.grails.plugins:mail:3.0.0"
runtimeOnly "org.glassfish.web:el-impl:2.2.1-b05"
runtimeOnly "javax.xml.bind:jaxb-api:2.3.1"
//--------------------
// Hoist Additions
//--------------------
api "com.hazelcast:hazelcast"
api "org.apache.tomcat:tomcat-jdbc"
api "org.codehaus.groovy:groovy-dateutil:$groovyVersion"
// Quartz, with Grails 4/5 workaround (https://github.com/grails-plugins/grails-quartz/issues/107
api("org.quartz-scheduler:quartz:2.3.2") {exclude group: 'slf4j-api', module: 'c3p0'}
api 'org.grails.plugins:quartz:2.0.13'
api "org.hibernate:hibernate-jcache"
api "org.apache.poi:poi:4.1.2"
api "org.apache.poi:poi-ooxml:4.1.2"
api "org.apache.poi:poi-ooxml-schemas:4.1.2"
api "org.apache.poi:ooxml-schemas:1.4"
api "org.apache.directory.api:api-all:2.1.3"
api "org.springframework:spring-websocket"
api "org.apache.httpcomponents.client5:httpclient5:5.2.1"
api 'org.jasypt:jasypt:1.9.3'
api "commons-io:commons-io:2.14.0"
api "org.owasp.encoder:encoder:1.2.3"
api "com.esotericsoftware:kryo:5.6.0"
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType(GroovyCompile) {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Dspring.output.ansi.enabled=always']
}
}
bootJar.enabled = false
tasks.bootRun.doFirst {
throw new RuntimeException('The bootRun task is not supported in hoist-core. If running in a "wrapper" config, ensure you run the task from your app, not the top-level wrapper.')
}
//------------------------
// Maven publishing
// This is a modified version of the gradle configs setup by the Grails plugin publishing plugin
// https://github.com/grails/grails-core/blob/master/grails-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/publishing/GrailsCentralPublishGradlePlugin.groovy
// The default behavior assumes publishing of non-snapshot builds only to the paid (if private) Bintray system
//------------------------
apply plugin:'maven-publish'
publishing {
publications {
hoistCore(MavenPublication) {
artifactId 'hoist-core'
pom.withXml {
Node pomNode = asNode()
if (pomNode.dependencyManagement) {
pomNode.dependencyManagement[0].replaceNode {}
}
pomNode.children().last() + {
delegate.name 'hoist-core'
delegate.description "Extremely Heavy Industry's toolkit for enterprise web applications."
delegate.url 'https://xh.io'
delegate.organization {
delegate.name 'Extremely Heavy Industries'
delegate.url 'https://xh.io'
}
delegate.scm {
delegate.url "https://github.com/xh/hoist-core"
delegate.connection "scm:git@github.com:xh/hoist-core.git"
delegate.developerConnection "scm:git@github.com:xh/hoist-core.git"
}
delegate.issueManagement {
delegate.system "GitHub"
delegate.url "https://github.com/xh/hoist-core/issues"
}
delegate.developers {
delegate.developer {
delegate.id 'xh'
delegate.name 'Extremely Heavy Industries'
delegate.email 'info@xh.io'
}
}
}
pomNode.dependencies.dependency.findAll {
it.version.text().isEmpty()
}.each {
it.replaceNode {}
}
}
from components.java
artifact sourcesJar
def groovyOutputDir = sourceSets.main.output.classesDirs.files.find{it.path.contains('/groovy/')}
artifact source: "${groovyOutputDir}/META-INF/grails-plugin.xml",
classifier: 'plugin',
extension: 'xml'
repositories {
maven {
def repoEndpoint = version.endsWith('-SNAPSHOT') ? 'snapshots' : 'releases'
url "https://repo.xh.io/content/repositories/$repoEndpoint/"
credentials {
username project.findProperty('xhRepoDeployUser')
password project.findProperty('xhRepoDeployPassword')
}
}
}
}
}
}
task publishHoistCore(dependsOn: 'publishHoistCorePublicationToMavenRepository') {
group 'xhio'
description 'Publishes a build to repo.xh.io.'
doLast {
println "Hoist $version published to repo.xh.io!"
}
}