forked from josephramsay/linz-admin-boundaries-ui
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
182 lines (157 loc) · 4.9 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
/**
build.gradle
Copyright 2014 Crown copyright (c)
Land Information New Zealand and the New Zealand Government.
All rights reserved
This program is released under the terms of the new BSD license. See the
LICENSE file for more information.
*/
buildscript {
repositories {
mavenLocal()
mavenCentral()
//mvnrepository { url "https://mvnrepository.com/artifact/" }
//maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "org.postgresql:postgresql:9.4-1206-jdbc42"
classpath 'com.bmuschko:gradle-cargo-plugin:2.7.1'
//pygradle
//classpath "gradle.plugin.com.linkedin.pygradle:pygradle-plugin:0.3.24"
//debpackage
//classpath 'com.netflix.nebula:gradle-ospackage-plugin:1+'
//junit
//classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-M4'
}
}
plugins {
//id "com.linkedin.python" version "0.3.24"
id 'com.linkedin.python-sdist' version '0.3.9'
id 'eclipse'
}
ext {
postgresqlJDBCVersion = '9.1-901.jdbc4'
postgresqlApiVersion = '9.4-1206-jdbc42'
postGISApiVersion = '2.2.0'
servletApiVersion = '3.+'
catalinaVersion = '9.0.14'
tomcatVersion = '9.0.14'
javaxJSONAPIVersion = '1.1.4'
javaxJSONVersion = '1.1.4'
junitVersion = '4.12'
jmockVersion = '2.9.0'
jsoupVersion = '1.11.3'
py4jVersion = '0.10.8.1'
//seleniumVersion '3.141.59'
cargoVersion = '2.4'
//psycopg2Version = '2.8.5'
}
//latest unavailable
//junitVersion = '5.3.2'//4.12
//jmockVersion = '2.8.2'
//cargoVersion = '1.4.5'
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'com.bmuschko.cargo'
//apply plugin: "com.linkedin.python"
//apply plugin: "nebula.deb"
version = '0.2'
sourceCompatibility = '1.8'
def webContext = 'ab'
def warDir = 'build/libs/'
def warName = 'ab.war'
def packName = 'AdminBoundaryDownloader'
def packVersion = '0.2'
//packages the uploader component linz-admin-boundaries-uploader into src/main/webapp
task copyscripts(type: Copy) {
//dependsOn test
//from('scripts') {
from('../linz-admin-boundaries-uploader/labu') {
include '**/*.py'
include '**/*.ini'
include '**/*.properties'
include '**/*.template'
}
into 'src/main/webapp/WEB-INF/scripts'
}
war {
dependsOn copyscripts
//exclude 'src/test/java/nz/govt/linz/AdminBoundariesUITest/**'
manifest {
attributes 'Implementation-Title': 'LINZ Admin Boundaries Downloader',
'Implementation-Version': version
}
archiveName = warName
}
task cargosetup {
print "> Server ${remoteHost}\n"
dependsOn war
cargo {
containerId = 'tomcat8x'
port = 8080
deployable {
file = file("./"+warDir+warName)
context = webContext
}
print "> warfile ${warDir}${warName}\n"
remote {
protocol = "${remoteProtocol}"
hostname = "${remoteHost}"
username = "${remoteUser}"
password = "${remotePass}"
}
}
}
/*task flake8 (overwrite: true){
ignore = "E3"
}*/
task redeploy {
dependsOn cargosetup, cargoRedeployRemote
}
task deploy {
dependsOn cargosetup, cargoDeployRemote
}
task undeploy {
dependsOn cargosetup, cargoUndeployRemote
}
repositories {
mavenCentral()
pyGradlePyPi()
ivy { url "../../ivy/repository" }
//flatDir name: "local", dirs: "~/ivy/repository"
//flatDir name: "local", dirs: "~/git/aims/build/libs"
}
dependencies {
//NB nz.govt.linz are local ivy repo workarounds. Replace as needed
//compile files("~/git/aims/build/libs/aims-dev.war")
//classpath "org.postgresql:postgresql:$postgresqlApiVersion"
providedCompile "javax.servlet:servlet-api:$servletApiVersion"
//providedCompile "nz.govt.linz:catalina:$catalinaVersion"
providedCompile "org.apache.tomcat:tomcat-catalina:$catalinaVersion"
providedCompile "org.apache.tomcat:tomcat-util:$tomcatVersion"
providedCompile "postgresql:postgresql:$postgresqlJDBCVersion"
providedRuntime "net.postgis:postgis-jdbc:$postGISApiVersion"
providedRuntime "org.postgresql:postgresql:$postgresqlApiVersion"
compile "net.sf.py4j:py4j:$py4jVersion"
compile "javax.json:javax.json-api:$javaxJSONAPIVersion"
compile "org.glassfish:javax.json:$javaxJSONVersion"
testCompile "junit:junit:$junitVersion"
testCompile "org.jmock:jmock:$jmockVersion"
testCompile "org.jsoup:jsoup:$jsoupVersion"
//testCompile "org.seleniumhq.selenium:selenium-java:$seleniumVersion"
/*
python "pypi:pexpect:4.2.1"
python "pypi:psycopg2:2.6.2"
python "pypi:GDAL:2.4.0"
*/
/*
//test "nz.govt.linz:psycopg2:2.6.2"
test "nz.govt.linz:psycopg2:2.8.5"
test "nz.govt.linz:pexpect:4.2.1"
//test "nz.govt.linz:pygdal:2.2.1.3"
test "nz.govt.linz:pygdal:3.1.2.6"
//test "org.gdal:gdal:2.4.0"
//test "nz.govt.linz:ptyprocess:0.5.1"
test "nz.govt.linz:ptyprocess:0.6.0"
*/
}