This repository has been archived by the owner on May 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
89 lines (71 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
87
88
89
plugins {
id "java-library"
id "maven-publish"
id "com.github.hierynomus.license" version "0.16.1"
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
repositories {
mavenCentral()
}
ext.lwjglVersion = "3.3.1"
ext.steamworks4jVersion = "1.9.0"
ext.steamworks4j_serverVersion = "1.9.0"
ext.lwjglNatives = ["linux", "windows", "macos", "macos-arm64"]
dependencies {
api 'org.checkerframework:checker-qual:2.5.6'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
//BOM for lwjgl - this contains all the artifacts but is not *included* except as a version catalog.
implementation platform("org.lwjgl:lwjgl-bom:$lwjglVersion")
//lwjgl
implementation "org.lwjgl:lwjgl"
implementation "org.lwjgl:lwjgl-glfw"
implementation "org.lwjgl:lwjgl-openal"
implementation "org.lwjgl:lwjgl-opengl"
implementation "org.lwjgl:lwjgl-opengles"
implementation "org.lwjgl:lwjgl-sse"
implementation "org.lwjgl:lwjgl-stb"
//natives
for(String lwjglNative : lwjglNatives) {
String cur = "natives-" + lwjglNative
runtimeOnly "org.lwjgl:lwjgl::$cur"
runtimeOnly "org.lwjgl:lwjgl-glfw::$cur"
runtimeOnly "org.lwjgl:lwjgl-openal::$cur"
runtimeOnly "org.lwjgl:lwjgl-opengl::$cur"
runtimeOnly "org.lwjgl:lwjgl-opengles::$cur"
runtimeOnly "org.lwjgl:lwjgl-sse::$cur"
runtimeOnly "org.lwjgl:lwjgl-stb::$cur"
};
//Steamworks
implementation "com.code-disaster.steamworks4j:steamworks4j:${steamworks4jVersion}"
implementation "com.code-disaster.steamworks4j:steamworks4j-server:${steamworks4j_serverVersion}"
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 17
}
java {
//Only here for wide IDE compatibility
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
test {
useJUnitPlatform()
}
license {
header rootProject.file('HEADER')
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
//TODO: Repositories to publish to
}
}