-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
150 lines (131 loc) · 4.77 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
////////////////////////////////////////////////////////////////////////////////////////////////////////////
// General Gradle Settings
////////////////////////////////////////////////////////////////////////////////////////////////////////////
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'project-report'
apply plugin: 'java-library-distribution'
apply plugin: 'org.owasp.dependencycheck'
group = 'com.spidasoftware'
version = '0.6.1'
description = "mongodb-geoserver-plugin"
sourceCompatibility = 11
targetCompatibility = 11
////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Dependencies
////////////////////////////////////////////////////////////////////////////////////////////////////////////
buildscript {
try {
project.ext.m2Settings = [
username: System.getenv('ARTIFACTORY_USERNAME'),
password: System.getenv('ARTIFACTORY_PASSWORD'),
repo: System.getenv('ARTIFACTORY_URL_PRIVATE'),
exposed: System.getenv('ARTIFACTORY_URL_EXPOSED'),
snapshots: System.getenv('ARTIFACTORY_URL'),
releases: System.getenv('ARTIFACTORY_URL')
]
} catch(ex){
println ex.message //use ex.printStackTrace() if you want to show the full stacktrace
}
//uncomment to print out maven settings
//println "m2Settings: ${m2Settings}"
repositories {
maven {
url m2Settings.repo
credentials {
username m2Settings.username
password m2Settings.password
}
}
}
dependencies {
classpath 'org.owasp:dependency-check-gradle:6.5.0.1'
}
}
repositories {
maven {
url m2Settings.repo
credentials {
username m2Settings.username
password m2Settings.password
}
}
maven { url "http://download.osgeo.org/webdav/geotools" }
}
task sourcesZip(type: Zip, dependsOn: classes) {
classifier = 'sources'
into ('') {
from { 'build.gradle' }
from { 'gradlew' }
from { 'gradlew.bat' }
from { 'LICENSE' }
from { 'README.md' }
}
into ('src') {
from { 'src' }
}
into ('gradle') {
from { 'gradle' }
}
}
distributions {
main {
contents {
from sourcesZip
into ('') {
from { 'LICENSE' }
from { 'README.md' }
}
exclude { override ->
override.file.path.matches('.*(gt|net|gs|jts|jscience|wicket|htmlvalidator|slf4j|log4j|gs|spring|bcprov|srvlet|json|commons|freemarker|xstream|guava|jsr|jasypt|jai|servlet|imageio|jdom|postgres|xpp|aopalliance|cglib|hsqldb|xmlpull|xpp|vecmath|jgrdidshift|org.w3|common|ecore|picocontainer|xsd|xml|jgridshift|core).*.jar')
}
}
}
}
artifacts { archives distZip }
uploadArchives {
repositories.mavenDeployer {
repository(url: m2Settings.exposed) {
authentication(userName: m2Settings.username, password: m2Settings.password)
}
}
}
def geotoolsVersion = '24.2'
def geoserverVersion = '2.19.0'
dependencies {
compile group: 'org.geotools', name: 'gt-main', version:"${geotoolsVersion}"
compile group: 'org.geotools', name: 'gt-opengis', version:"${geotoolsVersion}", transitive: false
compile group: 'org.geotools', name: 'gt-complex', version:"${geotoolsVersion}", transitive: false
compile group: 'org.geotools', name: 'gt-referencing', version:"${geotoolsVersion}", transitive: false
compile group: 'org.geotools', name: 'gt-metadata', version:"${geotoolsVersion}", transitive: false
compile group: 'org.geotools', name: 'gt-cql', version:"${geotoolsVersion}", transitive: false
compile group: 'org.geotools', name: 'gt-epsg-wkt', version:"${geotoolsVersion}", transitive: false
compile group: 'org.geotools.xsd', name: 'gt-xsd-core', version:"${geotoolsVersion}", transitive: false
compile group: 'org.geotools.ogc', name: 'net.opengis.wfs', version:"${geotoolsVersion}", transitive: false
// compile(group: 'org.geoserver.web', name: 'gs-web-core', version:"${geoserverVersion}") {
// exclude module: 'jai_core'
// }
compile group: 'org.mongodb', name:'mongo-java-driver', version:'3.8.2'
compile('org.locationtech.jts:jts:1.16.0')
compile('org.locationtech.jts:jts-core:1.16.0')
compile group: 'org.jscience', name:'jscience', version:'4.3.1', transitive: false
compile("org.apache.commons:commons-lang3:3.9")
runtime("commons-jxpath:commons-jxpath:1.3")
compile "org.codehaus.groovy:groovy-all:2.4.21"
testCompile "org.spockframework:spock-core:1.2-groovy-2.4"
testCompile 'org.objenesis:objenesis:1.4'
testRuntime('cglib:cglib-nodep:3.3.0')
}
test {
testLogging.showStandardStreams = true
systemProperty "mongoHost", "localhost"
systemProperty "mongoPort", "27017"
systemProperty "mongoDatabase", "test_spidadb_wfs"
}
dependencyCheck {
failBuildOnCVSS=7
suppressionFile="dependency-check-suppressions.xml"
formats = ["HTML"]
}