-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
90 lines (80 loc) · 2.5 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
90
// Apply the java plugin to add support for Java
apply plugin: 'java'
apply plugin: 'eclipse'
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "gradle.plugin.com.stehno:gradle-natives:0.2.4"
}
}
apply plugin: 'com.stehno.natives'
apply plugin: 'idea'
// In this section you declare where to find the dependencies of your project
repositories {
// Use 'jcenter' for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
mavenCentral()
maven { url "https://clojars.org/repo" }
}
sourceCompatibility = 1.8
// In this section you declare the dependencies for your production and test code
dependencies {
compile "org.projectlombok:lombok:1.16.8"
compile "org.lwjgl.lwjgl:lwjgl:2.9.3"
compile "org.lwjgl.lwjgl:lwjgl_util:2.9.3"
compile "com.google.guava:guava:18.0"
compile "com.flowpowered:flow-noise:1.0.0"
compile "com.google.code.gson:gson:2.2.4"
compile "ddf.minim:ddf.minim:2.2.0"
compile "org.yaml:snakeyaml:1.13"
compile "org.scream3r:jssc:2.8.0"
compile "net.java.dev.jna:jna:4.2.1"
compile "com.github.quickhull3d:quickhull3d:1.0.0"
compile fileTree(dir: 'lib', include: '*.jar')
}
natives {
jars = [
'lwjgl-platform-2.9.3-natives-windows',
'lwjgl-platform-2.9.3-natives-osx',
'lwjgl-platform-2.9.3-natives-linux',
'jinput-platform-2.0.5-natives-windows',
'jinput-platform-2.0.5-natives-osx',
'jinput-platform-2.0.5-natives-linux'
]
}
jar {
manifest {
attributes (
'Main-Class': 'com.techjar.ledcm.Main',
'Class-Path': configurations.compile.findAll { !it.getName().contains('lombok') && !it.getName().contains('natives') }.collect { 'build/libs/' + it.getName() }.join(' ')
)
}
}
task unpackNatives2(type: Copy) {
from 'lib/natives'
into 'build/natives'
}
task zip(type: Zip, dependsOn: ['build', 'unpackNatives']) {
from([jar.outputs, 'start.bat', 'start.sh']) {
into '/'
}
from('resources') {
exclude { details -> details.file.name.toLowerCase().endsWith('.psd') }
exclude { details -> details.file.name.toLowerCase().endsWith('.blend') }
exclude { details -> details.file.name.toLowerCase().endsWith('.blend1') }
into 'resources'
}
from(configurations.runtime) {
exclude { details -> details.file.name.contains('lombok') }
exclude { details -> details.file.name.contains('natives') }
into 'build/libs'
}
from('build/natives') {
into 'build/natives'
}
archiveName project.name + '-build' + System.getenv().BUILD_NUMBER + '.zip'
}
unpackNatives.dependsOn 'unpackNatives2'