-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
158 lines (118 loc) · 4.46 KB
/
build.gradle
File metadata and controls
158 lines (118 loc) · 4.46 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
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
// gradle version 9.1.0, in eclipse gradle version 9.1.0
plugins {
id "com.github.ben-manes.versions" version '0.53.0' // update check task: dependencyUpdates https://github.com/ben-manes/gradle-versions-plugin
}
/*
check for updates:
gradle dependencyUpdates
or
./gradlew dependencyUpdates
*/
/*
list (transitive) dependencies
gradle dependencies
or
./gradlew dependencies
*/
// upgrade gradle wrapper
//./gradlew wrapper --gradle-version=9.1.0
def isNonStable = { String version ->
return version.contains('alpha') || version.contains('beta')
}
dependencyUpdates {
rejectVersionIf { // reject all non stable versions
isNonStable(it.candidate.version)
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
compileJava.options.encoding = 'UTF-8'
java {
sourceCompatibility = '17' // build compatiblity with java 11 and newer
targetCompatibility = '17' // run compatiblity with java 11 and newer
}
repositories {
mavenCentral()
/* server not always reachable
maven { // needed for compile group: 'com.github.aelstad', name: 'keccakj', version: '1.1.0'
url 'https://repository.mulesoft.org/nexus/content/repositories/public'
}*/
flatDir { // local jar files
dirs 'lib'
}
}
dependencies {
implementation 'org.tinylog:tinylog-impl:2.8.0-M1'
runtimeOnly 'org.tinylog:slf4j-tinylog:2.8.0-M1'
implementation 'org.eclipse.jetty:jetty-server:11.0.26' // v12.x not compatible with Java 11
implementation 'org.eclipse.jetty:jetty-security:11.0.26'
implementation 'org.eclipse.jetty.http2:http2-server:11.0.26'
implementation 'org.eclipse.jetty:jetty-alpn-java-server:11.0.26'
implementation 'org.json:json:20250517'
implementation 'org.yaml:snakeyaml:1.33' // TODO: check compatibility with newer version 2.x
implementation 'de.siegmar:fastcsv:3.3.1'
implementation 'com.opencsv:opencsv:5.12.0'
implementation 'ch.randelshofer:fastdoubleparser:2.0.1'
implementation 'com.github.wendykierp:JTransforms:3.1'
implementation 'com.samskivert:jmustache:1.16'
//implementation 'com.github.aelstad:keccakj:1.1.0' // server not always reachable
implementation ':keccakj-1.1.0' // local jar file
implementation 'io.jsonwebtoken:jjwt-api:0.11.5' // breaking changes in 0.12.x
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'
implementation 'com.webauthn4j:webauthn4j-core:0.25.0.RELEASE'
implementation 'ar.com.hjg:pngj:2.1.0'
implementation 'org.imgscalr:imgscalr-lib:4.2'
implementation 'com.drewnoakes:metadata-extractor:2.19.0'
implementation 'com.h2database:h2:2.3.232' // old database v2.1.x files not compatible with v2.2.x
implementation 'org.reflections:reflections:0.10.2'
implementation 'org.lz4:lz4-java:1.8.0' // needed for xxHash
//implementation 'fr.delthas:javamp3:1.0.1' // version with IndexOutOfBoundsException bug
implementation ':javamp3-1.0.4' // local jar file from https://github.com/kevinstadler/JavaMP3
//implementation 'net.jthink:jaudiotagger:3.0.1'
implementation ':flac-library-java-2022-09-12' // local jar file derived from https://github.com/nayuki/FLAC-library-Java
}
sourceSets.main.java.srcDir 'src'
sourceSets.main.java.srcDir 'src_qoa'
jar {
from file('src/tinylog.properties')
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
}
}
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_mustache(type: Copy) {
from fileTree('mustache')
into 'package/mustache'
}
task _package(dependsOn:[ clean_package, jar, copy_lib, copy_webcontent, copy_mustache, copy_add ]) {
group = 'project'
}