-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
340 lines (289 loc) · 11.3 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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
/* build with:
* make sure to use java 8 and groovy 2.5
* ./gradlew publish (this pushed to nexus staging repo also)
* nexus-plugin docs say to use:
* ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
* or:
* ./gradlew publishToSonatype closeSonatypeStagingRepository
* to manually release at oss.sonatype.org
* or to publish locally
* ./gradlew publishToMavenLocal
*
* to update this wrapper version
* $ gradle wrapper --gradle-version 6.7 --distribution-type all
*/
buildscript {
repositories {
// mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.0.10"
// geb
classpath "gradle.plugin.com.energizedwork.webdriver-binaries:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion"
// nexus plugin for maven central publishing
classpath "io.github.gradle-nexus:publish-plugin:1.0.0"
}
}
// standard
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "org.grails.grails-plugin"
// apply plugin: "org.grails.grails-plugin-publish"
apply plugin: "asset-pipeline"
apply plugin: "org.grails.grails-gsp"
// extra
apply plugin: "application"
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: "io.github.gradle-nexus.publish-plugin"
apply plugin: "com.energizedwork.webdriver-binaries" // geb
version "4.1.21.1" // grails update
group "net.codebuilders"
description 'MyBusiness - a Grails 4.0 plugin for E-Commerce'
mainClassName = 'net.codebuilders.mybusiness.Application'
ext {
isReleaseVersion = !version.endsWith("SNAPSHOT") // used to not pgp sign snapshots
// isReleaseVersion = false // to force not signing
}
repositories {
// mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
// maven { url "http://dl.bintray.com/stefanogualdi/plugins" } // ckeditor
// maven { url "http://dl.bintray.com/lgrignon/plugins" } // hibernate search
// maven { url "https://dl.bintray.com/cmarcum/maven/" } // our grails-paypal and grails-ckeditor
maven { url "https://codebuilders.jfrog.io/artifactory/default-maven-local/" } // our grails-paypal
// mavenLocal() // temp
}
// new block for grails 4
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
dependencyManagement {
imports {
mavenBom "org.grails:grails-bom:$grailsVersion"
}
applyMavenExclusions false
}
// only used for multi-project build
// normally added in dependencies block/
// added here for hot reloads
// use dependency block for building releases
/*
grails {
plugins {
compile project(':grails-paypal')
}
}
*/
dependencies {
// standard 4.0 plugin
developmentOnly("org.springframework.boot:spring-boot-devtools")
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-web-boot"
compile "org.grails:grails-logging"
compile "org.grails:grails-plugin-rest"
compile "org.grails:grails-plugin-databinding"
compile "org.grails:grails-plugin-i18n"
compile "org.grails:grails-plugin-services"
compile "org.grails:grails-plugin-url-mappings"
compile "org.grails:grails-plugin-interceptors"
compile "org.grails.plugins:cache"
compile "org.grails.plugins:async"
compile "org.grails.plugins:scaffolding"
compile "org.grails.plugins:gsp"
compileOnly "io.micronaut:micronaut-inject-groovy"
console "org.grails:grails-console"
profile "org.grails.profiles:web-plugin"
runtime "com.bertramlabs.plugins:asset-pipeline-grails:3.0.10"
testCompile "io.micronaut:micronaut-inject-groovy"
testCompile "org.grails:grails-gorm-testing-support"
testCompile "org.mockito:mockito-core"
testCompile "org.grails:grails-web-testing-support"
// end standard - begin custom
compile 'org.grails.plugins:spring-security-core:4.0.3'
compile "org.grails.plugins:recaptcha:3.2.0"
compile 'org.grails.plugins:mail:3.0.0'
// ckeditor (our grails 4.0 fork)
compile "net.codebuilders:ckeditor:4.5.9.1"
// feeds (Atom/RSS Java Utilities)
compile 'com.rometools:rome:1.15.0'
compile 'com.rometools:rome-modules:1.15.0'
// ajax tags like formRemote that were deprecated in 2.4
compile 'org.grails.plugins:ajax-tags:1.0.0'
// for adding seed data since bootstrap.groovy doesn't run
compile 'com.bertramlabs.plugins:seed-me:4.0.0'
// for uploading images in bootstrap
compile group: 'org.springframework', name: 'spring-test', version: '5.2.9.RELEASE'
// for attaching photos to domains
compile 'com.bertramlabs.plugins:selfie:2.1.0' // problem with 2.1.3
// for using karman-aws for photos etc.
compile 'com.bertramlabs.plugins:karman-aws:1.5.1'
// for paypal
compile 'net.codebuilders:grails-paypal:4.0.1'
// for hibernate search
compile "org.grails.plugins:hibernate-search:2.4.0"
compile "org.grails.plugins:hibernate5:7.0.4"
compile "org.hibernate:hibernate-core:5.4.18.Final"
compile "org.hibernate:hibernate-ehcache:5.4.18.Final"
// see https://github.com/mathpere/grails-hibernate-search-plugin/issues/45
compile "org.hibernate:hibernate-search-orm:5.11.4.Final"
// for excel import - not yet used
// compile 'org.grails.plugins:excel-import:3.0.0' // grails 3.2 - 3.0.1 didn't work
// for openoffice
compile "net.codebuilders:juh:4.1.6"
compile "net.codebuilders:ridl:4.1.6"
compile "net.codebuilders:unoil:4.1.6"
compile "net.codebuilders:jurt:4.1.6"
compile "net.codebuilders:bootstrap-connector:4.1.6.0"
compile "net.codebuilders:guno-extension:4.1.6.10"
// for geb
testCompile "org.grails.plugins:geb"
testRuntime "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"
testRuntime "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion"
testRuntime "org.seleniumhq.selenium:selenium-safari-driver:$seleniumSafariDriverVersion"
testCompile "org.seleniumhq.selenium:selenium-remote-driver:$seleniumVersion"
testCompile "org.seleniumhq.selenium:selenium-api:$seleniumVersion"
testCompile "org.seleniumhq.selenium:selenium-support:$seleniumVersion"
// solved empty groovydoc pages
compile "org.codehaus.groovy:groovy-dateutil"
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
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
// custom for mybusiness below here...
assets {
packagePlugin = true
}
// exclude assets that are already present in main app
jar {
exclude "**/META-INF/assets/**"
exclude "**/META-INF/assets.list"
}
groovydoc {
docTitle = "MyBusiness Plugin API"
header = "Code Builders, LLC" // doesn't seem to work
footer = "Generated documentation ${version}"
windowTitle = docTitle
use = true // create class and package usage pages
}
archivesBaseName = 'mybusiness'
// added by JavaPluginExtension to the Java plugin to add tasks javadocJar and sourcesJar
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'mybusiness'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'MyBusiness Plugin API'
packaging = 'jar'
description = 'MyBusiness - a Grails 4.1 plugin for E-Commerce'
url = 'http://codebuilders.net'
inceptionYear = '2016'
scm {
url = 'https://github.com/cbmarcum/mybusiness'
developerConnection = 'https://github.com/cbmarcum/mybusiness'
connection = 'https://github.com/cbmarcum/mybusiness'
}
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
developers {
developer {
name = 'Carl Marcum'
email = '[email protected]'
url = 'http://codebuilders.net'
organization = 'Code Builders, LLC'
organizationUrl = 'http://codebuilders.net'
}
}
}
}
}
repositories {
maven {
// change URLs to point to your repos, e.g. http://my.org/repo
def releasesRepoUrl = "$buildDir/repos/releases"
def snapshotsRepoUrl = "$buildDir/repos/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
// credentials in .gradle
signing {
// only pgp sign if not a snapshot and we are uploading to maven repo
required { isReleaseVersion }
sign publishing.publications.mavenJava
sign configurations.archives
}
nexusPublishing {
repositories {
sonatype {
def ossUser = System.getenv("SONATYPE_USERNAME") ?: project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
def ossPass = System.getenv("SONATYPE_PASSWORD") ?: project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
def ossStagingProfileId = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: project.hasProperty("sonatypeOssStagingProfileId") ? project.sonatypeOssStagingProfileId : ''
// 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
}
}
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
// geb
webdriverBinaries {
chromedriver "$chromeDriverVersion"
geckodriver "$geckodriverVersion"
}
tasks.withType(Test) {
systemProperty "geb.env", System.getProperty('geb.env')
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
systemProperty "webdriver.chrome.driver", System.getProperty('webdriver.chrome.driver')
systemProperty "webdriver.gecko.driver", System.getProperty('webdriver.gecko.driver')
}