-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
56 lines (45 loc) · 1.63 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
import static org.gradle.internal.os.OperatingSystem.*
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.3.21'
}
group 'Panama'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
ext {
kx = "com.github.kotlin-graphics"
gln_version = '42256d1618525ea96a91848ec21bcbe15cdeba29'
lwjgl_version = "3.2.1"
lwjgl_natives = current() == WINDOWS ? "windows" : current() == LINUX ? "linux" : "macos"
}
repositories {
mavenCentral()
maven { setUrl("https://oss.sonatype.org/content/repositories/snapshots/") }
maven { setUrl("https://jitpack.io") }
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib"
testCompile group: 'junit', name: 'junit', version: '4.12'
api "$kx:gln:$gln_version".toString()
["", "-jemalloc"].each {
implementation "org.lwjgl:lwjgl$it:$lwjgl_version"
if (it != "-vulkan" && it != "-jawt")
runtime "org.lwjgl:lwjgl$it:$lwjgl_version:natives-$lwjgl_natives"
}
compile files("opengl.jar", "glfw.jar", "vulkan.jar")
}
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-XXLanguage:+InlineClasses", "-Xjvm-default=enable"]
jvmTarget = "1.8"
}
}
//task generateBindings(type:Exec) {
//
// //on linux
// commandLine '/usr/lib/jvm/jdk-13/bin/jextract -L /usr/lib/x86_64-linux-gnu -l glut -l GLU -l GL --record-library-path -t opengl -o opengl.jar /usr/include/GL/glut.h'
//
// commandLine '/usr/lib/jvm/jdk-13/bin/jextract -L /usr/lib/x86_64-linux-gnu -l glfw --record-library-path -t glfw -o glfw.jar /usr/include/GLFW/glfw3.h /usr/include/GLFW/glfw3native.h'
//}
//
//compile.dependsOn generateBindings