-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
169 lines (148 loc) · 5.7 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
buildscript {
repositories {
mavenLocal()
maven { url "https://nexus.ala.org.au/content/groups/public/" }
maven { url "https://repo.grails.org/grails/core" }
gradlePluginPortal()
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:$assetPipelineVersion"
classpath 'com.bmuschko:gradle-clover-plugin:3.0.1'
classpath 'org.grails.plugins:quartz:2.0.13'
classpath "gradle.plugin.com.energizedwork.webdriver-binaries:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion"
}
}
version "5.3-SNAPSHOT"
group "org.grails.plugins"
apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"org.grails.grails-plugin"
apply plugin:"org.grails.grails-plugin-publish"
apply plugin:"org.grails.grails-gsp"
apply plugin:"asset-pipeline"
apply plugin:"com.energizedwork.webdriver-binaries"
if (Boolean.valueOf(enableClover)) {
apply from: "${project.projectDir}/gradle/clover.gradle"
}
apply plugin:"maven-publish"
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
maven { url "https://nexus.ala.org.au/content/groups/public/" }
}
boolean inplace = false
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
dependencies {
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"
compile 'commons-io:commons-io:2.6'
console "org.grails:grails-console"
profile "org.grails.profiles:web-plugin"
provided "org.grails:grails-plugin-services"
provided "org.grails:grails-plugin-domain-class"
compile "com.bertramlabs.plugins:asset-pipeline-grails:$assetPipelineVersion"
testCompile "org.grails:grails-gorm-testing-support"
testCompile "org.grails.plugins:geb"
testCompile "org.grails:grails-web-testing-support"
testCompile 'com.codeborne:phantomjsdriver:1.3.0'
testCompile "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"
if (!inplace) {
compile ("org.grails.plugins:ala-map-plugin:4.0.1") {
exclude group: 'com.bertramlabs.plugins', module: 'asset-pipeline-grails'
}
}
compile "com.bertramlabs.plugins:asset-pipeline-core:$assetPipelineVersion"
}
tasks.withType(Test) {
systemProperty 'geb.env', System.getProperty('geb.env') ?: 'chromeHeadless'
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
testLogging {
events "passed", "skipped", "failed"
exceptionFormat 'full'
}
}
bootRun {
jvmArgs('-Dspring.output.ansi.enabled=always')
sourceResources sourceSets.main
String springProfilesActive = 'spring.profiles.active'
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}
// enable if you wish to package this plugin as a standalone application
bootJar.enabled = false
assets {
packagePlugin = true
}
publishing {
repositories {
maven {
name 'GitHubPackages'
url uri("https://maven.pkg.github.com/atlasoflivingaustralia/ecodata-client-plugin")
credentials {
username = System.getenv('GITHUB_ACTOR')
password = System.getenv('GITHUB_TOKEN')
}
}
}
publications {
mavenJar(MavenPublication) {
pom.withXml {
def pomNode = asNode()
pomNode.dependencyManagement.replaceNode {}
// simply remove dependencies without a version
// version-less dependencies are handled with dependencyManagement
// see https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/8 for more complete solutions
pomNode.dependencies.dependency.findAll {
it.version.text().isEmpty()
}.each {
it.replaceNode {}
}
}
from components.java
}
}
}
if (inplace) {
grails {
plugins {
compile (project(':ala-map-plugin'))
}
}
}
task _Events {
doLast {
println "Running _Events.groovy script"
println "${project.projectDir}/_Events.groovy"
new GroovyScriptEngine(["${project.projectDir}"] as String[]).run("_Events.groovy", new Binding(['projectDir': project.projectDir]))
}
}
// the tasks used here for dependsOn may be incomplete/incorrect
assetCompile.dependsOn(_Events)
compileGroovy.dependsOn(_Events)
bootRun.dependsOn(_Events)