-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
184 lines (152 loc) · 4 KB
/
Copy pathbuild.gradle
File metadata and controls
184 lines (152 loc) · 4 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
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
plugins {
id "java-library"
id "maven-publish"
//id "com.github.hierynomus.license" version "0.16.1"
}
base {
archivesName = "glow-gl";
}
version = "0.0.1";
group = "com.playsawdust.glow";
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
repositories {
mavenCentral()
}
dependencies {
api 'org.checkerframework:checker-qual:2.5.6'
api project(':glow-base')
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
}
sourceSets {
main {
java {
srcDir "src/java";
}
resources {
srcDir "src/resources";
}
}
}
//tasks.withType(JavaCompile).configureEach {
// it.options.encoding = "UTF-8"
// it.options.release = 25
//}
//java {
//Only here for wide IDE compatibility
// sourceCompatibility = JavaVersion.VERSION_25
// targetCompatibility = JavaVersion.VERSION_25
//}
test {
useJUnitPlatform()
}
//license {
// header rootProject.file('HEADER')
//}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
}
}
publishing {
publications {
mavenPrimary(MavenPublication) {
from components.java;
groupId project.group;
artifactId "glow-base";
version project.version;
pom {
name = "Glow - Base";
description = "Platform-Agnostic Graphics API";
url = "https://github.com/playsawdust/glow-base";
developers {
developer {
id = "falkreon"
name = "Isaac Ellingson"
email = "falkreon@gmail.com"
}
}
licenses {
license {
name = "MIT License"
url = "https://opensource.org/licenses/MIT"
distribution = "repo"
}
}
scm {
url = "https://github.com/playsawdust/glow-base"
connection = "scm:git@github.com:playsawdust/glow-base.git"
developerConnection = "scm:git@github.com:playsawdust/glow-base.git"
}
}
}
}
repositories {
if (project.hasProperty("sleepingUsername")) {
print "Publication credentials applied,"
maven {
url "https://repo-api.sleeping.town/"
credentials {
username = sleepingUsername
password = sleepingPassword
}
}
} else {
print "There were no credentials available for publication."
}
}
}
// Note: The following creates duplicate repositories/dependencies blocks, which is weirdly fine
// BEGIN LWJGL GENERATED BLOCK
import org.gradle.internal.os.OperatingSystem
project.ext.lwjglVersion = "3.4.1"
project.ext.steamworks4jVersion = "1.10.0"
switch (OperatingSystem.current()) {
case OperatingSystem.LINUX:
project.ext.lwjglNatives = "natives-linux"
def osArch = System.getProperty("os.arch")
if (osArch.startsWith("arm") || osArch.startsWith("aarch64")) {
project.ext.lwjglNatives += osArch.contains("64") || osArch.startsWith("armv8") ? "-arm64" : "-arm32"
} else if (osArch.startsWith("ppc")) {
project.ext.lwjglNatives += "-ppc64le"
} else if (osArch.startsWith("riscv")) {
project.ext.lwjglNatives += "-riscv64"
}
break
case OperatingSystem.MAC_OS:
project.ext.lwjglNatives = "natives-macos"
break
case OperatingSystem.WINDOWS:
project.ext.lwjglNatives = "natives-windows"
break
}
repositories {
mavenCentral()
}
dependencies {
implementation platform("org.lwjgl:lwjgl-bom:$lwjglVersion")
implementation "org.lwjgl:lwjgl"
implementation "org.lwjgl:lwjgl-assimp"
implementation "org.lwjgl:lwjgl-glfw"
implementation "org.lwjgl:lwjgl-openal"
implementation "org.lwjgl:lwjgl-opencl"
implementation "org.lwjgl:lwjgl-opengl"
implementation "org.lwjgl:lwjgl-stb"
implementation "org.lwjgl:lwjgl::$lwjglNatives"
implementation "org.lwjgl:lwjgl-assimp::$lwjglNatives"
implementation "org.lwjgl:lwjgl-glfw::$lwjglNatives"
implementation "org.lwjgl:lwjgl-openal::$lwjglNatives"
implementation "org.lwjgl:lwjgl-opengl::$lwjglNatives"
implementation "org.lwjgl:lwjgl-stb::$lwjglNatives"
implementation "com.code-disaster.steamworks4j:steamworks4j:${steamworks4jVersion}"
}
// END LWJGL GENERATED BLOCK