forked from gpc/grails-asynchronous-mail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
234 lines (208 loc) · 7.82 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
buildscript {
repositories {
maven { url "https://repo.grails.org/grails/core" }
maven { url "https://plugins.gradle.org/m2" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.3.4"
classpath "org.grails.plugins:hibernate5:7.2.0"
classpath "io.github.gradle-nexus:publish-plugin:1.0.0"
}
}
group "io.github.gpc"
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "org.grails.grails-plugin"
apply plugin: "asset-pipeline"
apply plugin: "org.grails.grails-gsp"
apply plugin: "maven-publish"
apply plugin: "signing"
apply plugin: "io.github.gradle-nexus.publish-plugin"
repositories {
maven { url "https://repo.grails.org/grails/core" }
}
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
dependencies {
compileOnly "io.micronaut:micronaut-inject-groovy"
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.plugins:async"
implementation "org.grails.plugins:scaffolding"
implementation "org.grails.plugins:hibernate5"
implementation "org.hibernate:hibernate-core:5.6.15.Final"
implementation "org.grails.plugins:gsp"
implementation "org.grails.plugins:mail:3.0.0"
// This is needed for the quartz-plugin on grails >= 4.0.x, https://github.com/grails-plugins/grails-quartz/issues/107#issuecomment-575951471
implementation("org.quartz-scheduler:quartz:2.3.2") {
exclude group: 'slf4j-api', module: 'c3p0'
}
implementation "org.grails.plugins:quartz:2.0.13"
profile "org.grails.profiles:web-plugin"
runtimeOnly "com.h2database:h2"
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
testImplementation "org.springframework.boot:spring-boot-starter-tomcat"
testImplementation "ch.qos.logback:logback-classic:1.2.12"
testImplementation "ch.qos.logback:logback-core:1.2.12"
testImplementation "io.micronaut:micronaut-inject-groovy"
testImplementation "org.grails:grails-gorm-testing-support"
testImplementation "org.grails:grails-web-testing-support"
}
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).configureEach {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Xmx1024m']
}
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
// enable if you wish to package this plugin as a standalone application
bootJar.enabled = false
jar {
enabled = true
archiveClassifier = ''
}
assets {
packagePlugin = true
}
publishing {
publications {
maven(MavenPublication) {
groupId = project.group
artifactId = 'asynchronous-mail'
version = project.version
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = 'Grails Asynchronous Mail Plugin'
description = 'The plugin realises asynchronous mail sending. It stores messages in a DB and sends them asynchronously by a quartz job.'
url = 'https://github.com/gpc/grails-asynchronous-mail'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'kefirfromperm'
name = 'Vitalii Samolovskikh'
}
developer {
id = 'stokito'
name = 'Sergey Ponomarev'
}
developer {
id = 'ilopmar'
name = 'Iván López'
}
developer {
id = 'burtbeckwith'
name = 'Burt Beckwith'
}
developer {
id = 'puneetbehl'
name = 'Puneet Behl'
}
developer {
id = 'aberbenni'
name = 'Alessandro Berbenni'
}
developer {
id = 'dpcasady'
name = 'Danny Casady'
}
developer {
id = 'SAgrawal14'
name = 'Shashank Agrawal'
}
developer {
id = 'visheshd'
name = 'Vishesh'
}
developer {
id = 'micke-a'
name = 'Mikael Andersson'
}
developer {
id = 'pgdoval'
name = 'Pablo González Doval'
}
developer {
id = 'Uniqen'
name = 'Magnus Dalin'
}
developer {
id = 'demon101'
name = 'Demon'
}
developer {
id = 'matrei'
name = 'Mattias Reichel'
}
}
scm {
connection = 'scm:git:git://github.com/gpc/grails-asynchronous-mail.git'
developerConnection = 'scm:git:ssh://github.com:gpc/grails-asynchronous-mail.git'
url = 'https://github.com/gpc/grails-asynchronous-mail'
}
}
}
}
}
ext."signing.keyId" = project.findProperty('signing.keyId') ?: System.getenv('SIGNING_KEY_ID')
ext."signing.password" = project.findProperty('signing.password') ?: System.getenv('SIGNING_PASSPHRASE')
ext."signing.secretKeyRingFile" = project.findProperty('signing.secretKeyRingFile') ?: (System.getenv('SIGNING_PASSPHRASE') ?: "${System.getProperty('user.home')}/.gnupg/secring.gpg")
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
afterEvaluate {
signing {
required { isReleaseVersion }
sign publishing.publications.maven
}
}
tasks.withType(Sign).configureEach {
onlyIf { isReleaseVersion }
}
nexusPublishing {
repositories {
sonatype {
def ossUser = System.getenv("SONATYPE_USERNAME") ?: project.findProperty('sonatypeOss2Username') ?: ''
def ossPass = System.getenv("SONATYPE_PASSWORD") ?: project.findProperty("sonatypeOss2Password") ?: ''
def ossStagingProfileId = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: project.findProperty("sonatypeOssStagingProfileIdJms") ?: ''
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
username = ossUser
password = ossPass
stagingProfileId = ossStagingProfileId
}
}
}
tasks.register('snapshotVersion') {
doLast {
if (!project.version.endsWith('-SNAPSHOT')) {
ant.propertyfile(file: "gradle.properties") {
entry(key: "version", value: "${project.version}-SNAPSHOT")
}
}
}
}