-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.gradle
More file actions
130 lines (107 loc) · 3.33 KB
/
build.gradle
File metadata and controls
130 lines (107 loc) · 3.33 KB
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
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'java'
id 'application'
id 'org.beryx.runtime' version '2.0.1'
}
def simpleProjectName = "JDFEditor"
if (project.hasProperty('projectVersion')) {
version = project.projectVersion
} else {
version = 'development'
}
repositories {
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
processResources {
filesMatching('**/*.properties') {
filter(ReplaceTokens, tokens: [
'name' : project.properties['name'],
'version' : project.properties['version'],
'timestamp': new Date().format('yyyy-MM-dd HH:mm:ss')
])
}
}
application {
mainClass = 'org.cip4.tools.jdfeditor.Editor'
}
configurations {
all*.exclude group: 'xml-apis', module: 'xml-apis'
}
dependencies {
implementation 'org.cip4.lib.jdf:JDFLibJ-JSON:2.0.+'
implementation 'org.cip4.tools.jdfutility:JDFUtility:2.8.+'
implementation ('org.cip4.lib.jdf:JDFLibJ:2.2.8.+'){
exclude group: 'xml-apis'
}
implementation ('xerces:xercesImpl:2.12.2'){transitive=false}
implementation 'org.eclipse.jetty:jetty-server:12.1.7'
implementation 'org.eclipse.jetty.ee10:jetty-ee10-servlet:12.1.7'
implementation ('com.googlecode.json-simple:json-simple:1.1.1'){transitive=false}
implementation 'commons-configuration:commons-configuration:1.10'
implementation 'commons-collections:commons-collections:3.2.2'
implementation 'com.sun.woodstock.dependlibs:jhall:2.0'
implementation 'com.fifesoft:rsyntaxtextarea:3.6.2'
implementation 'commons-logging:commons-logging-api:1.1'
implementation 'org.apache.commons:commons-lang3:3.20.0'
implementation 'commons-io:commons-io:2.21.0'
implementation ('com.networknt:json-schema-validator:3.0.1')
implementation 'com.sun.mail:jakarta.mail:2.0.2'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:3.+'
}
runtime {
modules = [
'jdk.xml.dom',
'jdk.unsupported'
]
additive = true
jpackage {
imageOptions = [
"--copyright", "CIP4 Organization",
"--vendor", "CIP4 Organization"
]
def currentOs = org.gradle.internal.os.OperatingSystem.current()
def icon = "src/main/dist/windows/jdfeditor_128.ico"
if (currentOs.macOsX) {
imageOptions += [
"--mac-sign",
"--mac-signing-key-user-name", "CIP4 Organization (4DL5XX9SG8)",
"--mac-package-identifier", "org.cip4.jdfeditor"
]
icon = "src/main/dist/macosx/jdfeditor.icns"
}
if (currentOs.windows) {
installerOptions += [
"--win-dir-chooser",
"--win-menu",
"--win-upgrade-uuid", "800cfb27-5ece-4275-9ed3-1a305b5b1636",
"--vendor", "CIP4 Organization"
]
}
imageOptions += ["--icon", icon]
appVersion = project.version == "development" ? "1.0.0" : project.version
}
}
java {
base.archivesName = simpleProjectName
sourceCompatibility = 17
targetCompatibility = 17
}
startScripts {
applicationName = simpleProjectName
}
test {
def currentOs = org.gradle.internal.os.OperatingSystem.current()
dependsOn(jre)
if (currentOs.windows) {
executable = jre.getJreDir().dir("bin").file("java.exe").getAsFile().getAbsolutePath()
}
else
{
executable = jre.getJreDir().dir("bin").file("java").getAsFile().getAbsolutePath()
}
}