-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
71 lines (59 loc) · 1.93 KB
/
build.gradle
File metadata and controls
71 lines (59 loc) · 1.93 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
/*
* For more details take a look at the Java Libraries chapter in the Gradle
* user guide available at https://docs.gradle.org/3.4.1/userguide/java_library_plugin.html
*/
import org.gradle.internal.os.OperatingSystem
// Apply the java-library plugin to add support for Java Library
apply plugin: 'java-library'
apply plugin: 'maven-publish'
version = '0.0.4'
// Determine operating system for LWJGL natives
switch ( OperatingSystem.current() ) {
case OperatingSystem.WINDOWS:
project.ext.lwjglNatives = "natives-windows"
break
case OperatingSystem.LINUX:
project.ext.lwjglNatives = "natives-linux"
break
case OperatingSystem.MAC_OS:
project.ext.lwjglNatives = "natives-macos"
break
}
project.ext.lwjglVersion = "3.1.1"
// In this section you declare where to find the dependencies of your project
repositories {
jcenter()
}
dependencies {
// These dependencies are exported to consumers, that is to say found on their compile classpath.
api "org.lwjgl:lwjgl:${lwjglVersion}"
api "org.lwjgl:lwjgl-glfw:${lwjglVersion}"
api "org.lwjgl:lwjgl-openal:${lwjglVersion}"
api "org.lwjgl:lwjgl-opengl:${lwjglVersion}"
// These dependencies are available to consumers at runtime
runtime "org.lwjgl:lwjgl:${lwjglVersion}:${lwjglNatives}"
runtime "org.lwjgl:lwjgl-glfw:${lwjglVersion}:${lwjglNatives}"
runtime "org.lwjgl:lwjgl-openal:${lwjglVersion}:${lwjglNatives}"
runtime "org.lwjgl:lwjgl-opengl:${lwjglVersion}:${lwjglNatives}"
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.+'
}
test {
testLogging {
exceptionFormat = 'full'
}
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId 'com.tacocat'
from components.java
}
}
}
model {
tasks.generatePomFileForMavenJavaPublication {
destination = file("$buildDir/libs/lambda-${version}.pom")
}
}