-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
155 lines (141 loc) · 5.92 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
plugins {
id "com.github.erdi.webdriver-binaries" version "${ webdriverPluginVersion }" apply false
id "com.github.ben-manes.versions" version "${ versionsPluginVersion }"
id 'com.google.cloud.tools.jib' version "${ jibPluginVersion }" apply false
id 'maven-publish'
}
subprojects { project ->
boolean isGrailsApp = project.name.endsWith( '-app' )
boolean isGrailsPlugin = project.name.endsWith( '-plugin' )
boolean isGrailsProject = isGrailsApp || isGrailsPlugin
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
version projectVersion
group = groupName
repositories {
mavenLocal()
if ( System.getenv( 'MAVEN_DOWNLOAD_URL' ) ) {
maven {
url System.getenv( 'MAVEN_DOWNLOAD_URL' )
credentials {
username "${ System.getenv( "MAVEN_PROXY_USERNAME" ) }"
password "${ System.getenv( "MAVEN_PROXY_PASSWORD" ) }"
}
}
}
maven { url 'https://repo.osgeo.org/repository/release/' }
mavenCentral()
maven { url "https://repo.grails.org/grails/core/" }
}
publishing {
publications {
"${ project.name }"( MavenPublication ) {
from components.java
groupId = project.group
version project.version
}
}
repositories {
maven {
url = "${ System.getenv( 'MAVEN_PUBLISH_URL' ) }"
credentials {
username "${ System.getenv( "MAVEN_PROXY_USERNAME" ) }"
password "${ System.getenv( "MAVEN_PROXY_PASSWORD" ) }"
}
}
}
}
if ( isGrailsProject ) {
apply plugin: 'application'
apply plugin: 'org.grails.grails-gsp'
apply plugin: 'org.grails.grails-web'
apply plugin: 'com.bertramlabs.asset-pipeline'
if ( isGrailsApp ) {
apply plugin: 'com.github.erdi.webdriver-binaries'
} else if ( isGrailsPlugin ) {
apply plugin: 'org.grails.grails-plugin'
}
configurations {
all {
resolutionStrategy.force "org.codehaus.groovy:groovy-xml:${ groovyVersion }"
if ( isGrailsApp ) {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if ( details.requested.group == 'org.seleniumhq.selenium' ) {
details.useVersion( seleniumVersion )
}
}
}
}
}
dependencies {
developmentOnly( "org.springframework.boot:spring-boot-devtools" )
implementation( "org.grails:grails-core" )
implementation( "org.grails:grails-logging" )
implementation( "org.grails:grails-plugin-databinding" )
implementation( "org.grails:grails-plugin-i18n" )
implementation( "org.grails:grails-plugin-interceptors" )
implementation( "org.grails:grails-plugin-rest" )
implementation( "org.grails:grails-plugin-services" )
implementation( "org.grails:grails-plugin-url-mappings" )
implementation( "org.grails:grails-web-boot" )
implementation( "org.grails.plugins:gsp" )
implementation( "org.grails.plugins:hibernate5" )
implementation( "org.grails.plugins:scaffolding" )
implementation( "org.hibernate:hibernate-core:${ hibernateCoreVersion }" )
implementation( "org.springframework.boot:spring-boot-autoconfigure" )
implementation( "org.springframework.boot:spring-boot-starter" )
implementation( "org.springframework.boot:spring-boot-starter-actuator" )
implementation( "org.springframework.boot:spring-boot-starter-logging" )
implementation( "org.springframework.boot:spring-boot-starter-tomcat" )
implementation( "org.springframework.boot:spring-boot-starter-validation" )
compileOnly( "io.micronaut:micronaut-inject-groovy" )
runtimeOnly( "com.bertramlabs.plugins:asset-pipeline-grails:${ assetPipelineVersion }" )
runtimeOnly( "com.h2database:h2" )
runtimeOnly( "javax.xml.bind:jaxb-api:${ jaxbVersion }" )
runtimeOnly( "org.apache.tomcat:tomcat-jdbc" )
runtimeOnly( "org.fusesource.jansi:jansi:${ jansiVersion }" )
runtimeOnly( "org.glassfish.web:el-impl:${ glassfishVersion }" )
testImplementation( "io.micronaut:micronaut-inject-groovy" )
testImplementation( "org.grails:grails-gorm-testing-support" )
testImplementation( "org.grails:grails-web-testing-support" )
testImplementation( "org.spockframework:spock-core" )
testImplementation( "io.micronaut:micronaut-http-client" )
console( "org.grails:grails-console" )
if ( isGrailsApp ) {
testImplementation( "org.grails.plugins:geb" )
testImplementation( "org.seleniumhq.selenium:selenium-api:${ seleniumVersion }" )
testImplementation( "org.seleniumhq.selenium:selenium-remote-driver:${ seleniumVersion }" )
testImplementation( "org.seleniumhq.selenium:selenium-support:${ seleniumVersion }" )
testRuntimeOnly( "org.seleniumhq.selenium:selenium-chrome-driver:${ seleniumVersion }" )
testRuntimeOnly( "org.seleniumhq.selenium:selenium-firefox-driver:${ seleniumVersion }" )
testRuntimeOnly( "org.seleniumhq.selenium:selenium-safari-driver:${ seleniumVersion }" )
} else if ( isGrailsPlugin ) {
}
}
application {
mainClass.set( "${ project.name.replace( '-', '.' ) }.Application" )
}
java {
sourceCompatibility = JavaVersion.toVersion( "17" )
}
tasks.withType( Test ) {
useJUnitPlatform()
if ( isGrailsApp ) {
systemProperty "geb.env", System.getProperty( 'geb.env' )
systemProperty "geb.build.reportsDir", reporting.file( "geb/integrationTest" )
systemProperty 'webdriver.chrome.driver', "${ System.getenv( 'CHROMEWEBDRIVER' ) }/chromedriver"
systemProperty 'webdriver.gecko.driver', "${ System.getenv( 'GECKOWEBDRIVER' ) }/geckodriver"
}
}
if ( isGrailsApp ) {
webdriverBinaries {
chromedriver webdriverChromeVersion
geckodriver webdriverGeckoVersion
edgedriver webdriverEdgeVersion
}
} else if ( isGrailsPlugin ) {
}
}
}