-
Notifications
You must be signed in to change notification settings - Fork 27
/
build.gradle
122 lines (110 loc) · 2.41 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
apply plugin: 'c'
apply plugin: 'cpp'
apply plugin: 'java'
task copyCore(type: Copy) {
def d = new File('dist/c/')
d.mkdirs()
from './src/telemetry/'
into './dist/Telemetry/'
include '**/**.c','**/**.h'
}
task copyVersion(type: Copy) {
from '.'
into '/dist/Telemetry'
include 'telemetry_version.h'
}
task compress(type: Zip) {
dependsOn << copyCore
dependsOn << copyVersion
from './dist/Telemetry/'
into '.'
archiveName 'Telemetry.zip'
}
task distribute() {
dependsOn << compress
dependsOn << copyCore
dependsOn << copyVersion
}
clean.doFirst {
delete "${rootDir}/dist/"
println "${rootDir}/dist/"
}
model {
buildTypes {
debug
release
}
toolChains {
gcc(Gcc) { }
}
components {
telemetry(NativeLibrarySpec) {}
test(NativeExecutableSpec) {
binaries.all {
lib library: "telemetry"
}
sources {
c {
source {
srcDirs "./test/c/"
include "**/**.c"
}
exportedHeaders {
srcDirs "./test/headers"
include "**/**.h"
}
}
}
}
telemetry_cpp(NativeLibrarySpec) {
sources {
cpp {
source {
srcDirs "src/telemetry/c"
include "**/*.c"
}
exportedHeaders {
srcDirs "src/telemetry/headers"
}
}
}
}
test_cpp(NativeExecutableSpec) {
binaries.all {
lib library: "telemetry_cpp"
}
sources {
cpp {
source {
srcDirs "./test/c"
include "**/*.c"
}
exportedHeaders {
srcDirs "./test/headers"
}
}
}
}
/*
Test vector generator. Whatever comes out of it is the reference.
It uses directly the original C-api in a native form to generate the test
vectors.
It generates a set of correct and incorrect vectors.
Distributions are tested against both of thoses and must decode all
corrects vectors and discard all incorrects.
*/
testVectorsGenerator(NativeExecutableSpec) {
binaries.all {
lib library: "telemetry"
}
sources {
c {
source {
srcDirs "./tools/testvectorsgenerator/c"
include "main.c"
}
}
}
}
}
}