-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
104 lines (89 loc) · 3.22 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
plugins {
id 'java'
id 'jacoco'
id "net.saliman.properties" version "1.5.1"
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
group 'com.marklogic.geotools'
version '1.0-SNAPSHOT'
java {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
repositories {
maven {
url 'https://repo.osgeo.org/repository/release/'
}
mavenCentral()
}
ext {
// Matching up the versions to those found in geoserver-2.22.1
geotoolsVersion = '28.1'
jtsVersion = '1.19.0'
springSecurityVersion = '5.1.13.RELEASE'
springVersion = '5.2.22.RELEASE'
}
dependencies {
// Each compileOnly dependency is already part of the geoserver webapp
compileOnly "org.geotools:gt-cql:${geotoolsVersion}"
compileOnly "org.geotools:gt-epsg-hsql:${geotoolsVersion}"
compileOnly "org.geotools:gt-jdbc:${geotoolsVersion}"
compileOnly "org.geotools:gt-main:${geotoolsVersion}"
compileOnly "org.springframework:spring-context:${springVersion}"
compileOnly "org.springframework.security:spring-security-bom:${springSecurityVersion}"
compileOnly "org.springframework.security:spring-security-core:${springSecurityVersion}"
compileOnly "org.springframework.security:spring-security-config:${springSecurityVersion}"
compileOnly "org.springframework.security:spring-security-web:${springSecurityVersion}"
compileOnly "org.locationtech.jts:jts-core:${jtsVersion}"
compileOnly "org.apache.commons:commons-collections4:4.2"
compileOnly "com.fasterxml.jackson.core:jackson-databind:2.13.4.2"
// These are the only dependencies needed at runtime, in addition to the compileOnly ones above that are already
// present in the geoserver webapp.
implementation "com.marklogic:marklogic-client-api:6.1.0"
implementation "org.geotools:gt-geojson:${geotoolsVersion}"
// Have to repeat some compileOnly dependencies so the tests can compile
testImplementation "org.geotools:gt-cql:${geotoolsVersion}"
testImplementation "org.geotools:gt-epsg-hsql:${geotoolsVersion}"
testImplementation "org.geotools:gt-jdbc:${geotoolsVersion}"
testImplementation "org.geotools:gt-main:${geotoolsVersion}"
testImplementation "org.springframework.security:spring-security-core:${springSecurityVersion}"
testImplementation "com.fasterxml.jackson.core:jackson-databind:2.13.4.2"
testImplementation "org.glassfish.jersey.core:jersey-client:2.25.1"
testImplementation "junit:junit:4.13.2"
testImplementation "ch.qos.logback:logback-classic:1.3.5"
testImplementation "org.slf4j:jcl-over-slf4j:1.7.36"
testImplementation "org.slf4j:slf4j-api:1.7.36"
}
shadowJar {
archiveClassifier.set("")
}
task deploy(type: Copy, dependsOn: ["shadowJar"]) {
from("build/libs") {
include "${project.name}-${version}.jar"
}
into "${geoserverHome}/webapps/geoserver/WEB-INF/lib"
}
jacoco {
toolVersion = "0.8.4"
reportsDir = file("$buildDir/jacocoReports")
}
jacocoTestReport {
reports {
xml.enabled true
csv.enabled false
html.destination file("${buildDir}/jacocoReports/html")
}
}
jacocoTestCoverageVerification {
violationRules {
rule {
enabled = true
element = 'CLASS'
limit {
counter = 'COMPLEXITY'
value = 'COVEREDRATIO'
minimum = 0.2
}
}
}
}