-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
68 lines (59 loc) · 1.71 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
plugins {
id 'java'
id 'de.undercouch.download' version '4.0.0'
}
group 'ca.fiercest'
version '1.21'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
configurations {
extraLibs
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile 'junit:junit:4.12'
//Package JNA with the jar.
extraLibs 'net.java.dev.jna:jna:4.4.0'
//Lombok
compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
configurations.compile.extendsFrom(configurations.extraLibs)
}
jar {
//Include all resources in the Jar.
from("src/main/resources") {
include "**/*.*"
}
from(configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }) {}
}
/**
* Gets the Cue SDK and moves it to the resources folder
*/
task DownloadCUESdk {
doLast {
download {
src 'http://downloads.corsair.com/Files/CUE/CUESDK_3.0.361.zip'
dest file("$buildDir/sdk/cuesdk.zip")
}
println("Downloaded SDK")
copy {
from zipTree(file("$buildDir/sdk/cuesdk.zip"))
into file("$buildDir/sdk")
}
println("Unzipping SDK")
copy {
from file("$buildDir/sdk/CUESDK/redist/i386/CUESDK_2017.dll")
into file("$projectDir/src/main/resources/win32-x86")
rename "CUESDK_2017.dll", "CueSDK.dll"
}
copy {
from file("$buildDir/sdk/CUESDK/redist/x64/CUESDK.x64_2017.dll")
into file("$projectDir/src/main/resources/win32-x86-64")
rename "CUESDK.x64_2017.dll", "CueSDK.dll"
}
println("Moved SDK to Resources")
}
}
build.dependsOn DownloadCUESdk