-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
83 lines (66 loc) · 2.07 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
import org.gradle.internal.os.OperatingSystem
switch (OperatingSystem.current()) {
case OperatingSystem.LINUX:
def osArch = System.getProperty("os.arch")
project.ext.lwjglNatives = osArch.startsWith("arm") || osArch.startsWith("aarch64")
? "natives-linux-${osArch.contains("64") || osArch.startsWith("armv8") ? "arm64" : "arm32"}"
: "natives-linux"
break
case OperatingSystem.MAC_OS:
project.ext.lwjglNatives = "natives-macos"
break
case OperatingSystem.WINDOWS:
project.ext.lwjglNatives = System.getProperty("os.arch").contains("64") ? "natives-windows" : "natives-windows-x86"
break
}
apply plugin: 'idea'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
group 'io.github.ocelot'
version '1.0.1'
if (System.getenv('BUILD_NUMBER') != null) {
version += "." + System.getenv('BUILD_NUMBER')
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
}
dependencies {
implementation platform("org.lwjgl:lwjgl-bom:3.3.3")
implementation "org.lwjgl:lwjgl"
implementation "org.lwjgl:lwjgl-glfw"
runtimeOnly "org.lwjgl:lwjgl::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-glfw::$lwjglNatives"
compileOnly 'org.jetbrains:annotations:24.1.0'
implementation "org.slf4j:slf4j-api:2.0.12"
// Objective C for Mac
implementation "ca.weblite:java-objc-bridge:1.2"
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
// Test OpenGL
testImplementation "org.lwjgl:lwjgl-opengl"
testRuntimeOnly "org.lwjgl:lwjgl-opengl::$lwjglNatives"
testImplementation 'ch.qos.logback:logback-core:1.5.1'
testImplementation 'ch.qos.logback:logback-classic:1.5.1'
}
test {
useJUnitPlatform()
}
java {
withSourcesJar()
withJavadocJar()
}
publishing {
publications {
myJava(MavenPublication) {
from components.java
}
}
repositories {
maven {
url "file://" + System.getenv("local_maven")
}
}
}