forked from environmentalinformatics-marburg/rsdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
170 lines (134 loc) · 6.28 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
plugins {
id "org.kordamp.markdown.convert" version "1.2.0" // https://github.com/aalmiray/markdown-gradle-plugin
id "com.github.ben-manes.versions" version "0.29.0" // update check task: dependencyUpdates https://github.com/ben-manes/gradle-versions-plugin
}
// check for updates:
//gradle dependencyUpdates
// list (transitive) dependencies
//gradle dependencies
def isNonStable = { String version ->
return version.contains('alpha') || version.contains('beta')
}
dependencyUpdates {
rejectVersionIf { // reject all non stable versions
isNonStable(it.candidate.version)
}
}
markdownToHtml {
sourceDir file('webfiles')
outputDir file('package/webfiles')
}
apply plugin: 'java'
apply plugin: 'eclipse'
compileJava.options.encoding = 'UTF-8'
//remove gdal dependency if loaded in eclipse for manual gdal library specification
eclipse {
classpath {
file {
whenMerged { classpath ->
classpath.entries.removeIf { it instanceof org.gradle.plugins.ide.eclipse.model.Library && it.moduleVersion.toString() == 'org.gdal:gdal:2.2.0' }
}
}
}
}
repositories {
jcenter()
maven { // needed for compile group: 'com.github.aelstad', name: 'keccakj', version: '1.1.0'
url 'https://repository.mulesoft.org/nexus/content/repositories/public'
}
}
dependencies {
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.13.3'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.13.3'
implementation group: 'org.apache.logging.log4j', name: 'log4j-web', version: '2.13.3'
implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.13.3'
implementation group: 'com.lmax', name: 'disruptor', version: '3.4.2'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30'
implementation group: 'org.mapdb', name: 'mapdb', version: '2.0-beta13' // warning: newer versions v3 do break storage layout
implementation group: 'org.json', name: 'json', version: '20200518'
implementation group: 'org.yaml', name: 'snakeyaml', version: '1.26'
implementation group: 'com.opencsv', name: 'opencsv', version: '4.6' // warning: API at v5.0 breaks
implementation group: 'com.github.mreutegg', name: 'laszip4j', version: '0.7'
implementation group: 'ar.com.hjg', name: 'pngj', version: '2.1.0'
implementation group: 'com.samskivert', name: 'jmustache', version: '1.15'
implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
implementation group: 'com.mkobos', name: 'pca_transform', version: '1.0.2'
implementation group: 'com.googlecode.javaewah', name: 'JavaEWAH', version: '1.1.7'
implementation group: 'org.xerial.snappy', name: 'snappy-java', version: '1.1.7.7' // caution: newer versions may break storage layout
// implementation group: 'me.lemire.integercompression', name: 'JavaFastPFOR', version: '0.1.11' // data format changed from 0.1.11 to 0.1.12
implementation group: 'me.lemire.integercompression', name: 'JavaFastPFOR', version: '0.1.12' // caution: newer versions may break storage layout
implementation group: 'com.github.luben', name: 'zstd-jni', version: '1.4.5-6' // caution: newer versions may break storage layout
implementation group: 'org.antlr', name: 'antlr4-runtime', version: '4.7.2'
implementation group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.4.31.v20200723'
implementation group: 'org.eclipse.jetty', name: 'jetty-security', version: '9.4.31.v20200723'
implementation group: 'org.eclipse.jetty.http2', name: 'http2-server', version: '9.4.31.v20200723'
implementation group: 'org.eclipse.jetty', name: 'jetty-alpn-java-server', version: '9.4.31.v20200723'
implementation group: 'org.eclipse.jetty', name: 'jetty-client', version: '9.4.31.v20200723'
implementation 'io.jsonwebtoken:jjwt-api:0.11.2'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.2'
runtimeOnly 'io.jsonwebtoken:jjwt-gson:0.11.2'
compileOnly group: 'org.gdal', name: 'gdal', version: '2.2.0' // compileOnly because gdal library from executing system is needed; caution: newer versions may break compatibility
implementation group: 'org.locationtech.jts', name: 'jts-core', version: '1.17.1'
implementation group: 'org.locationtech.proj4j', name: 'proj4j', version: '1.1.1'
//implementation group: 'org.imintel', name: 'mbtiles4j', version: '1.0.6' // mbtiles currently not used
implementation group: 'com.github.aelstad', name: 'keccakj', version: '1.1.0'
}
sourceSets.main.java.srcDir 'src'
sourceSets.main.java.srcDir 'dsl/generated-sources'
sourceSets.main.java.srcDir 'src_testing'
jar {
from file('src/log4j2.xml')
destinationDirectory = project.layout.projectDirectory.dir('package')
manifest {
String classPathFiles = "";
for(java.io.File file : files(configurations.runtimeClasspath)) {
classPathFiles += "lib/"+file.getName()+" ";
}
println("the class path: "+classPathFiles);
attributes 'Built-Date': new Date(),
'Built-JDK': System.getProperty('java.version'),
'Main-Class': 'run.Terminal',
'Class-Path': classPathFiles
}
}
compileJava {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
tasks.withType(JavaCompile){
//options.deprecation = true
//options.listFiles = true
//options.verbose = true
}
task clean_package(type: Delete) {
delete 'package'
}
task copy_lib(type: Copy) {
from files(configurations.runtimeClasspath)
into 'package/lib'
}
task copy_add(type: Copy) {
from fileTree('add')
into 'package'
}
task copy_webcontent(type: Copy) {
from fileTree('webcontent')
into 'package/webcontent'
}
task copy_webfiles(type: Copy) {
from fileTree('webfiles')
into 'package/webfiles'
}
task copy_mustache(type: Copy) {
from fileTree('mustache')
into 'package/mustache'
}
task copy_webfiles_with_markdown(dependsOn: markdownToHtml) { //convert markdown to html and copy all other files
}
task copy_build(type: Copy, dependsOn: [jar]) {
from fileTree('build/libs')
into 'package'
}
task _package(dependsOn:[ clean_package, copy_build, copy_lib, copy_webcontent, copy_webfiles_with_markdown, copy_mustache, copy_add ]) {
group = 'project'
}