This repository has been archived by the owner on Aug 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
86 lines (76 loc) · 2.06 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
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'java'
id 'application'
}
group 'org.citygml4j'
version '2.10.0'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
compileJava {
options.release = 8
}
}
repositories {
mavenCentral()
}
ext {
citygml4jVersion = '2.11'
date = new Date()
}
dependencies {
implementation 'args4j:args4j:2.33'
implementation 'org.glassfish.jaxb:jaxb-xjc:2.3.2'
}
jar {
manifest {
attributes('Implementation-Title': project.name,
'Implementation-Version': project.version,
'Specification-Version': citygml4jVersion,
'Main-Class': application.mainClass,
'Class-Path': configurations.runtimeClasspath.collect{ it.name }.join(' ')
)
into('META-INF') {
from 'LICENSE'
}
}
}
application {
mainClass = 'org.citygml4j.ade_xjc.ADESchemaCompiler'
executableDir = ''
startScripts {
defaultJvmOpts = ['-Djavax.xml.accessExternalSchema=file']
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: [
version: project.version,
date: date.format('yyyy-MM-dd'),
copyright: date.format('yyyy'),
javaCompatibility: compileJava.options.release.get().toString(),
appName: project.name,
citygml4jVersion: citygml4jVersion
])
}
into('jaxb-plugins') {
from 'jaxb-plugins'
}
into('schemas') {
from 'schemas'
}
into('sample') {
from 'sample'
}
into('license') {
from 'LICENSE'
}
}