-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
167 lines (136 loc) · 5.65 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
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java library project to get you started.
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
* User Manual available at https://docs.gradle.org/7.5.1/userguide/building_java_projects.html
*/
plugins {
// Apply the java-library plugin for API and implementation separation
id 'java-library'
// Publish to a repository
id 'maven-publish'
// Run main class
id 'application'
// Create a fat jar
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
// Group and version
group = 'org.tum-gis'
version = '1.0.0'
archivesBaseName = 'citykg'
// Java compatibility
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
repositories {
// Use Maven Central for resolving dependencies
mavenCentral()
}
dependencies {
// Use JUnit Jupiter for testing
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
// This dependency is exported to consumers, that is to say found on their compile classpath
// api 'org.apache.commons:commons-math3:3.6.1'
// This dependency is used internally, and not exposed to consumers on their own compile classpath
// implementation 'com.google.guava:guava:31.0.1-jre'
// https://mvnrepository.com/artifact/org.citygml4j/citygml4j-core
implementation 'org.citygml4j:citygml4j-core:3.2.1'
// https://mvnrepository.com/artifact/org.citygml4j/citygml4j-xml
implementation 'org.citygml4j:citygml4j-xml:3.2.1'
// https://mvnrepository.com/artifact/org.citygml4j/citygml4j
implementation 'org.citygml4j:citygml4j:2.13.0'
// https://mvnrepository.com/artifact/org.citygml4j/citygml4j-cityjson
implementation 'org.citygml4j:citygml4j-cityjson:3.2.2'
// https://mvnrepository.com/artifact/org.neo4j/neo4j
implementation 'org.neo4j:neo4j:5.25.1'
// https://mvnrepository.com/artifact/com.typesafe/config
implementation 'com.typesafe:config:1.4.3'
// https://mvnrepository.com/artifact/uk.co.jemos.podam/podam
implementation 'uk.co.jemos.podam:podam:8.0.2.RELEASE'
// https://mvnrepository.com/artifact/com.github.davidmoten/rtree
implementation 'com.github.davidmoten:rtree:0.12'
// https://mvnrepository.com/artifact/org.apache.commons/commons-geometry-core
implementation 'org.apache.commons:commons-geometry-core:1.0'
// https://mvnrepository.com/artifact/org.apache.commons/commons-geometry-euclidean
implementation 'org.apache.commons:commons-geometry-euclidean:1.0'
// https://mvnrepository.com/artifact/org.apache.commons/commons-geometry-spherical
implementation 'org.apache.commons:commons-geometry-spherical:1.0'
// https://mvnrepository.com/artifact/ch.qos.logback/logback-classic
implementation 'ch.qos.logback:logback-classic:1.5.12'
}
//configurations.all {
// exclude(group: 'org.slf4j', module: 'slf4j-nop')
//}
configurations.all {
exclude group: 'org.neo4j', module: 'neo4j-slf4j-provider'
}
run {
mainClass = 'citykg/app/CityKG'
applicationDefaultJvmArgs = [
'-Xms8g', '-Xmx16g',
'--add-opens', 'java.base/java.lang=ALL-UNNAMED',
'--add-opens', 'java.base/java.lang.ref=ALL-UNNAMED',
'--add-opens', 'java.base/java.lang.reflect=ALL-UNNAMED',
'--add-opens', 'java.base/java.nio=ALL-UNNAMED',
'--add-opens', 'java.base/java.io=ALL-UNNAMED',
'--add-opens', 'java.base/java.time=ALL-UNNAMED',
'--add-opens', 'java.base/java.util=ALL-UNNAMED',
'--add-opens', 'java.base/java.util.concurrent=ALL-UNNAMED',
'--add-opens', 'java.base/jdk.internal.loader=ALL-UNNAMED',
'--add-opens', 'java.base/jdk.internal.ref=ALL-UNNAMED',
'--add-opens', 'java.base/sun.net.www.protocol.http=ALL-UNNAMED',
'--add-opens', 'java.base/sun.nio.ch=ALL-UNNAMED'
]
systemProperty 'logback.configurationFile', 'config/logback.xml'
}
tasks.named('test') {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
minHeapSize = '8g'
maxHeapSize = '16g'
jvmArgs = [
'--add-opens', 'java.base/java.lang=ALL-UNNAMED',
'--add-opens', 'java.base/java.lang.ref=ALL-UNNAMED',
'--add-opens', 'java.base/java.lang.reflect=ALL-UNNAMED',
'--add-opens', 'java.base/java.nio=ALL-UNNAMED',
'--add-opens', 'java.base/java.io=ALL-UNNAMED',
'--add-opens', 'java.base/java.time=ALL-UNNAMED',
'--add-opens', 'java.base/java.util=ALL-UNNAMED',
'--add-opens', 'java.base/java.util.concurrent=ALL-UNNAMED',
'--add-opens', 'java.base/jdk.internal.loader=ALL-UNNAMED',
'--add-opens', 'java.base/jdk.internal.ref=ALL-UNNAMED',
'--add-opens', 'java.base/sun.net.www.protocol.http=ALL-UNNAMED',
'--add-opens', 'java.base/sun.nio.ch=ALL-UNNAMED'
]
systemProperty 'logback.configurationFile', 'config/logback.xml'
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:none"
options.release = 17
}
// Repository to publish
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = 'citykg'
}
}
// Local publishing for testing, you can change this to a remote repository
repositories {
maven {
name = 'local'
url = uri("${buildDir}/repo")
}
}
}
mainClassName = 'citykg/app/CityKG'
shadowJar {
archiveBaseName.set('3dcitykg')
archiveVersion.set('1.0.0')
setProperty("zip64", true)
destinationDirectory = file("${project.rootDir}")
}