forked from citygml4j/citygml-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
172 lines (153 loc) · 5.59 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
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'java'
id 'application'
id 'distribution'
}
version '1.3.2'
mainClassName = 'org.citygml4j.tools.CityGMLTools'
sourceCompatibility = 1.8
ext {
citygml4jVersion = '2.10.4'
date = new Date()
}
allprojects {
group 'org.citygml4j.tools'
repositories {
maven {
url 'http://download.osgeo.org/webdav/geotools'
}
jcenter()
}
}
subprojects {
apply plugin: 'java-library'
sourceCompatibility = 1.8
dependencies {
implementation "org.citygml4j:citygml4j:$citygml4jVersion"
}
plugins.withType(MavenPublishPlugin) {
jar {
manifest {
attributes('Implementation-Title': project.name,
'Implementation-Version': project.version
)
}
into('META-INF') {
from "$rootDir/LICENSE"
}
}
javadoc {
options {
overview "$buildDir/tmp/javadoc/overview.html"
header "$project.name $project.version"
bottom """
<a href="https://github.com/citygml4j/citygml-tools/issues">Report a bug or suggest an enhancement</a><br>
${project.name} is open source and licensed under the <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a><br>
Official website and more information at: <a target="_blank" href="https://github.com/citygml4j/citygml-tools">https://github.com/citygml4j/citygml-tools</a><br>
Copyright © 2018-${date.format('yyyy')}<br>
Claus Nagel <[email protected]>
""".replaceAll("[\r|\n]+", "")
addStringOption('doctitle', project.name + ' - ' + project.version)
addStringOption('Xdoclint:none', '-quiet')
}
doFirst {
copy {
from "$rootDir/resources/javadoc/overview.html"
into "$buildDir/tmp/javadoc"
filter(ReplaceTokens, tokens: [
name: project.name,
version: project.version,
citygmlTools: rootProject.name,
copyright: date.format('yyyy')
])
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = project.name
description = project.description
url = 'https://github.com/citygml4j/citygml-tools'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
developers {
developer {
id = 'clausnagel'
name = 'Claus Nagel'
email = '[email protected]'
roles = ['architect', 'developer']
timezone = '+1'
}
}
scm {
url = 'https://github.com/citygml4j/citygml-tools'
connection = 'scm:git:https://github.com/citygml4j/citygml-tools.git'
}
}
}
}
}
}
}
dependencies {
implementation project(':citygml-tools-common')
implementation project(':global-app-mover')
implementation project(':height-changer')
implementation project(':lod-filter')
implementation project(':reproject')
implementation project(':texture-clipper')
implementation "org.citygml4j:citygml4j:$citygml4jVersion"
implementation 'info.picocli:picocli:4.0.4'
}
jar {
manifest {
attributes('Implementation-Title': project.name,
'Implementation-Version': project.version
)
}
}
startScripts {
defaultJvmOpts = ['-Xms1G']
doLast {
def windowsScript = getWindowsScript()
def unixScript = getUnixScript()
windowsScript.text = windowsScript.text.replaceFirst('set APP_HOME=.*', '$0\r\nset WORKING_DIR=%CD%')
unixScript.text = unixScript.text.replaceFirst('APP_HOME=.*', '$0\nexport APP_HOME\nexport WORKING_DIR=\\$SAVED')
}
}
distributions.main.contents {
from('resources/doc/README') {
filter(ReplaceTokens, tokens: [
name: project.name,
version: project.version,
date: date.format('yyyy-MM-dd'),
copyright: date.format('yyyy'),
javaCompatibility: sourceCompatibility.toString()
])
}
into('license') {
from 'LICENSE'
}
from(file("$buildDir/tmp/dir")) {
mkdir "$buildDir/tmp/dir/ade-extensions"
}
}