-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
77 lines (61 loc) · 1.73 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
apply plugin: 'java'
apply plugin: 'eclipse'
version = '0.1.0'
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
from 'jni/libVideoState.so'
manifest {
attributes 'Main-Class' : 'mobileworkloads.jlagmarker.JLagmarkerMain',
'Implementation-Title' : 'JLagmarker',
'Implementation-Version' : version
}
}
configurations {
noExport
}
repositories {
mavenCentral()
}
dependencies {
compile group: 'nz.ac.waikato.cms.weka', name: 'weka-stable', version: '3.6.6'
compile files('lib/algovResourceTools.jar')
}
task buildNative(type: Exec, description: 'Compile JNI source') {
def ndkDir = "./jni"
commandLine "make", "-C", "$ndkDir"
}
task cleanNative(type: Exec, description: 'Clean JNI object files') {
def ndkDir = "./jni"
commandLine "make", "-C", "$ndkDir", "clean"
}
task unzipLibav(type: Copy, description: 'Unpack libav library files') {
def zipFile = file('lib/libav-0.8.16.zip')
def outputDir = file("lib/libav-0.8.16")
from zipTree(zipFile)
into outputDir
}
task cleanLibav(type: Exec, description: 'Remove libav library files') {
commandLine "rm","-rf","lib/libav-0.8.16"
}
clean.dependsOn 'cleanNative','cleanLibav'
compileJava.finalizedBy buildNative
compileJava.finalizedBy unzipLibav
buildNative.mustRunAfter compileJava
buildNative.mustRunAfter unzipLibav
task wrapper(type: Wrapper) {
gradleVersion = '2.4'
}
eclipse {
classpath {
defaultOutputDir = file('build-eclipse')
downloadSources = true
downloadJavadoc = true
}
}