forked from opensha/opensha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
148 lines (131 loc) · 4.94 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
/*
* opensha dependencies
*/
apply plugin: 'java-library'
apply plugin: 'eclipse'
ext {
parentProject = null
}
apply from: 'build-common.gradle'
// added any resource exclusions here that we don't need in builds
sourceSets {
main {
resources {
exclude '**/doc'
exclude '**/data/ngaWest'
exclude '**/data/site'
exclude '**/scratchData'
exclude '**/data/erf/new_zealand_2010'
exclude '**/data/erf/step/AllCal96ModelDaily.txt'
exclude '**/data/erf/ucerf3/EarthquakeCatalog'
exclude '**/data/erf/nshm23/seismicity/spatial_seis_pdfs/*/CONUS_EAST'
}
}
}
test {
minHeapSize = "128m"
maxHeapSize = "2048m"
filter {
includeTestsMatching "*Suite*"
}
}
task testVerbose (type: Test) {
testLogging {
events "failed"
}
beforeSuite { descr ->
println("Executing SUITE: $descr.className > $descr.displayName")
}
afterTest { descr, result ->
def time = (result.endTime - result.startTime)/1000.0
if (time > 1)
println("\t$descr.className > $descr.displayName: $result.resultType in $time s")
}
afterSuite { descr, result ->
def time = (result.endTime - result.startTime)/1000.0
println("SUITE $descr.className: $result.resultType in $time s")
}
minHeapSize = "128m"
maxHeapSize = "2048m"
filter {
includeTestsMatching "*Suite*"
}
}
task testOperational (type: Test) {
// this forces it to always be rerun
systemProperty "random.testing.seed", new Random().nextInt()
testLogging {
events "passed", "skipped", "failed"
}
filter {
includeTestsMatching "*Operational*"
}
}
dependencies {
api "ghsc:nshmp-gmm:1.5.5" // when you update this, also update nshmp-haz in dev to match
api 'com.google.guava:guava:31.1-jre'
api 'com.google.code.gson:gson:2.8.9'
api 'org.jfree:jfreechart:1.5.3'
api 'org.jfree:org.jfree.chart3d:2.1.0'
api 'org.dom4j:dom4j:2.1.1'
api 'edu.stanford.ejalbert:BrowserLauncher2:1.3'
api 'com.itextpdf:itextpdf:5.5.13.2'
api 'gov.nist.math:jama:1.0.3'
api 'javax.servlet:javax.servlet-api:3.1.0'
api 'javax.mail:mail:1.4.7'
api 'org.apache.poi:poi:3.16'
api 'net.mahdilamb:colormap:0.9.511'
/* apache commons */
api 'org.apache.commons:commons-lang3:3.11'
api 'org.apache.commons:commons-text:1.8'
api 'commons-codec:commons-codec:1.10'
api 'commons-cli:commons-cli:1.4'
api 'commons-io:commons-io:2.5'
api 'org.apache.commons:commons-math3:3.6.1'
api 'org.apache.commons:commons-compress:1.27.1'
/* Atlassan commonmark - Markdown utilities */
api 'com.atlassian.commonmark:commonmark:0.10.0'
api 'com.atlassian.commonmark:commonmark-ext-gfm-tables:0.10.0'
api 'com.atlassian.commonmark:commonmark-ext-heading-anchor:0.10.0'
/* no remote repo */
api files('lib/ncCore-4.0.jar')
implementation files('lib/mpj-0.38.jar') // MPJ API
api files('lib/f2jutil.jar') // used by NNLS code
api files('lib/mpj-task-calculator-1.1.jar') // MPJTaskCalculator
api files('lib/parallelcolt-0.9.4.jar')
api files('lib/csparsej.jar')
api files('lib/ojdbc5.jar')
api files('lib/sdoapi.jar')
api files('lib/EventWebService.jar')
api files('lib/jpedal.jar')
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:3.5.13'
}
// TODO: application build tasks
ext {
appSuffix = '-'+getDate()+'-'+getGitHash()
}
createAppTask("appJarHC", "HazardCurveGUI"+appSuffix, "org.opensha.sha.gui.HazardCurveApplication")
createAppTask("appJarHS", "HazardSpectrumGUI"+appSuffix, "org.opensha.sha.gui.HazardSpectrumApplication")
createAppTask("appJarAR", "AttenuationRelationshipGUI"+appSuffix, "org.opensha.sha.imr.attenRelImpl.gui.AttenuationRelationshipApplet")
createAppTask("appJarSM", "ShakeMapGUI"+appSuffix, "org.opensha.sha.gui.ScenarioShakeMapApp")
createAppTask("appJarSD", "SiteDataGUI"+appSuffix, "org.opensha.commons.data.siteData.gui.SiteDataCombinedApp")
createAppTask("appJarGMT", "GMTMapApp"+appSuffix, "org.opensha.commons.mapping.gmt.gui.GMT_MapGeneratorApplet")
createAppTask("appJarIM", "IMEventSetAppV3"+appSuffix, "org.opensha.sha.calc.IM_EventSet.v03.IM_EventSetCalc_v3_0_ASCII")
task appZipIM(type: Zip) {
dependsOn 'appJarIM'
from ('build/libs/') {
include 'IMEventSetAppV3-'+getDate()+'-'+getGitHash()+'.jar'
rename (('IMEventSetAppV3-'+getDate()+'-'+getGitHash()+'.jar'), 'IM_EventSetCalc_v3_0_ASCII.jar')
}
from ('src/main/java/org/opensha/sha/calc/IM_EventSet/v03/') {
include '*.txt'
}
archiveFileName = 'IM_EventSetCalc_v3_0_ASCII.zip'
doFirst {
System.out.println("Assembling IM Event Set zip file: ./build/distributions/IM_EventSetCalc_v3_0_ASCII.zip")
}
}
task appJars(type: GradleBuild) {
tasks = ['appJarHC', 'appJarHS', 'appJarAR', 'appJarSM', 'appJarSD', 'appJarGMT']
}