-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
210 lines (181 loc) · 7.34 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
plugins {
id "com.install4j.gradle" version "10.0.4"
id "com.dorongold.task-tree" version "1.5"
id "de.undercouch.download" version "4.1.1"
}
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
ext {
appName = "GaiaSky"
gdxVersion = "1.12.1"
gdxcontrollersVersion = "2.2.3"
lwjglVersion = "3.3.3"
jcommanderVersion = "2.+"
slf4jVersion = "2.0.+"
sparkjavaVersion = "2.9.+"
jafamaVersion = "2.3.+"
commonsioVersion = "2.+"
py4jVersion = "0.10.9.+"
oshiVersion = "6.6.+"
stilVersion = "4.3"
jsampVersion = "1.3.+"
apfloatVersion = "1.14.+"
jacksonVersion = "2.16.+"
ashleyVersion = "1.7.4"
jtarVersion = "2.+"
// Vulnerability fixes
jettyVersion = "10.0.24"
jsonVersion = "20231013"
xmlrpcVersion = "3.0"
}
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
project(":core") {
apply plugin: "java-library"
def cmd = "git describe --abbrev=0 --tags HEAD"
def proc = cmd.execute()
project.ext.tag = proc.text.trim()
cmd = "git rev-parse --short HEAD"
proc = cmd.execute()
project.ext.rev = proc.text.trim()
if (DefaultNativePlatform.currentOperatingSystem.windows) {
project.ext.system = DefaultNativePlatform.currentOperatingSystem.getName() + " " + DefaultNativePlatform.currentArchitecture.getName()
} else {
cmd = "uname -snmr"
proc = cmd.execute()
project.ext.system = proc.text.trim()
}
project.ext.builder = System.properties["user.name"]
project.ext.buildtime = new Date()
version = "$tag"
println ""
println "CURRENT SYSTEM"
println "=============="
println "java version: " + JavaVersion.current().toString()
println "system: $system"
println ""
println "GAIA SKY"
println "========"
println "git tag: $tag"
println "git rev: $rev"
println "buildtime: $buildtime"
println "builder: $builder"
println ""
// Set some build variables
project.ext.baseDir = System.getProperty("user.dir")
project.ext.tagRev = project.tag + "." + project.rev
project.ext.distName = "gaiasky-$tagRev"
project.ext.releasesDir = "$baseDir/releases"
project.ext.distDir = "$releasesDir/$distName"
project.ext.packageName = "packages-$tagRev"
project.ext.packageDir = "$releasesDir/$packageName"
println ""
println "BUILD VARIABLES AND INFO"
println "========================"
println "base dir: $baseDir"
println "tag.rev: $tagRev"
println "dist name: $distName"
println "dist dir: $distDir"
println "packages name: $packageName"
println "packages dir: $packageDir"
println ""
tasks.withType(JavaCompile).configureEach { options.compilerArgs << "-parameters" }
dependencies {
// *****************************
// GENERATE SKINS (PackUITextures)
// *****************************
//api "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
// ************
// REGULAR DEPS
// ************
// OpenXR
api group: "org.lwjgl", name: "lwjgl-openxr", version: "$lwjglVersion"
api group: "org.lwjgl", name: "lwjgl-glfw", version: "$lwjglVersion"
runtimeOnly "org.lwjgl:lwjgl-openxr:$lwjglVersion:natives-linux"
runtimeOnly "org.lwjgl:lwjgl-openxr:$lwjglVersion:natives-windows"
// LibGDX
api group: "com.badlogicgames.gdx", name: "gdx", version: "$gdxVersion"
api group: "com.badlogicgames.gdx", name: "gdx-backend-lwjgl3", version: "$gdxVersion"
runtimeOnly "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
// gdx-controllers:2.+ bases up on SDL 2.0.12
api group: "com.badlogicgames.gdx-controllers", name: "gdx-controllers-core", version: "$gdxcontrollersVersion"
api group: "com.badlogicgames.gdx-controllers", name: "gdx-controllers-desktop", version: "$gdxcontrollersVersion"
// Ashley
api group: "com.badlogicgames.ashley", name: "ashley", version: "$ashleyVersion"
// STIL library to load datasets
api group: "uk.ac.starlink", name: "stil", version: "$stilVersion"
// JSAMP for SAMP communication
api group: "uk.ac.starlink", name: "jsamp", version: "$jsampVersion"
// Apfloat for arbitrary precision floating point numbers
api group: "org.apfloat", name: "apfloat", version: "$apfloatVersion"
// File utilities
api group: "commons-io", name: "commons-io", version: "$commonsioVersion"
// Command line arguments
api group: "org.jcommander", name: "jcommander", version: "$jcommanderVersion"
// Fast math
api group: "net.jafama", name: "jafama", version: "$jafamaVersion"
// Tar
api group: "org.kamranzafar", name: "jtar", version: "$jtarVersion"
// Scripting
api group: "net.sf.py4j", name: "py4j", version: "$py4jVersion"
// System information
api group: "com.github.oshi", name: "oshi-core", version: "$oshiVersion"
// Yaml
api group: "com.fasterxml.jackson.core", name: "jackson-databind", version: "$jacksonVersion"
api group: "com.fasterxml.jackson.dataformat", name: "jackson-dataformat-yaml", version: "$jacksonVersion"
api group: "com.fasterxml.jackson.datatype", name: "jackson-datatype-jsr310", version: "$jacksonVersion"
// ****************
// REST SERVER DEPS
// ****************
api group: "org.slf4j", name: "slf4j-nop", version: "$slf4jVersion"
api group: "com.sparkjava", name: "spark-core", version: "$sparkjavaVersion"
// *******************
// VULNERABILITY FIXES
// *******************
// CVE-2023-26049
api group: "org.eclipse.jetty", name: "jetty-xml", version: "$jettyVersion"
api group: "org.eclipse.jetty", name: "jetty-http", version: "$jettyVersion"
api group: "org.eclipse.jetty", name: "jetty-server", version: "$jettyVersion"
// CVE-2022-45690
api group: "org.json", name: "json", version: "$jsonVersion"
// CVE-2016-5002
api group: "org.apache.xmlrpc", name: "xmlrpc", version: "$xmlrpcVersion"
// *************
// INTERNAL DEPS
// *************
api files("../assets")
}
jar {
manifest {
attributes "Implementation-Title": "Gaia Sky",
"Implementation-Version": archiveVersion,
"Main-Class": "gaiasky.desktop.GaiaSkyDesktop"
}
from("../assets") {
include "font/main-font.fnt"
include "font/main-font.png"
include "font/font2d.fnt"
include "font/font2d.png"
include "font/font-titles.fnt"
include "font/font-titles.png"
include "icon/gs_icon.png"
include "icon/gsvr_icon.png"
include "icon/gsascii.txt"
include "img/**"
include "text/**"
include "shader/**"
include "archetypes/**"
include "data/**"
include "shaders/**"
include "skins/**"
exclude "skins/raw"
exclude "assets-bak/**"
}
from("build/classes/main") { include "**" }
}
}