-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
175 lines (140 loc) · 4.92 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* user guide available at https://docs.gradle.org/4.9/userguide/tutorial_java_projects.html
*/
plugins {
// Apply the java plugin to add support for Java
id 'java'
// Apply the application plugin to add support for building an application
id 'application'
id 'eclipse'
id 'cpp'
//add a taskTree task for overview
id 'com.dorongold.task-tree' version '1.3'
}
configurations {
jre
cert
}
model {
platforms {
x86 {
architecture "x86"
}
x64 {
architecture "x86_64"
}
}
components {
OseaQrsDet(NativeLibrarySpec) {
targetPlatform "x86"
binaries.all {
if (targetPlatform.operatingSystem.macOsX) {
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include"
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/darwin"
cppCompiler.args '-mmacosx-version-min=10.4'
linker.args '-mmacosx-version-min=10.4'
} else if (targetPlatform.operatingSystem.linux) {
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include"
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/linux"
cppCompiler.args '-D_FILE_OFFSET_BITS=64'
} else if (targetPlatform.operatingSystem.windows) {
cppCompiler.args "-I${org.gradle.internal.jvm.Jvm.current().javaHome}/include"
cppCompiler.args "-I${org.gradle.internal.jvm.Jvm.current().javaHome}/include/win32"
linker.args "Shlwapi.lib", "Advapi32.lib"
} else if (targetPlatform.operatingSystem.freeBSD) {
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include"
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/freebsd"
}
}
}
OseaQrsDet2(NativeLibrarySpec) {
targetPlatform "x86"
binaries.all {
if (targetPlatform.operatingSystem.macOsX) {
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include"
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/darwin"
cppCompiler.args '-mmacosx-version-min=10.4'
linker.args '-mmacosx-version-min=10.4'
} else if (targetPlatform.operatingSystem.linux) {
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include"
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/linux"
cppCompiler.args '-D_FILE_OFFSET_BITS=64'
} else if (targetPlatform.operatingSystem.windows) {
cppCompiler.args "-I${org.gradle.internal.jvm.Jvm.current().javaHome}/include"
cppCompiler.args "-I${org.gradle.internal.jvm.Jvm.current().javaHome}/include/win32"
linker.args "Shlwapi.lib", "Advapi32.lib"
} else if (targetPlatform.operatingSystem.freeBSD) {
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include"
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/freebsd"
}
}
}
}
}
// Define the main class for the application
mainClassName = 'de.fzi.ekgeditor.EKGEditor'
dependencies {
compile 'com.google.guava:guava:23.0'
compile 'com.github.unisens:unisens4java:2.2.1'
compile ('org.eclipse.platform:org.eclipse.swt.win32.win32.x86:3.106.3') {
transitive = false
}
//compile ('org.eclipse.platform:org.eclipse.swt.win32.win32.x86_64:3.106.3') {
// transitive = false
//}
compile group: 'commons-io', name: 'commons-io', version: '2.6'
compile group: 'net.harawata', name: 'appdirs', version: '1.0.1'
// Use JUnit test framework
testCompile 'junit:junit:4.12'
jre('com.movisens.dataanalyzer.requirements:jre:1.8.0_60')
cert('com.movisens.dataanalyzer.requirements:cert:1.0')
}
task requirements(type: Copy) {
from({ zipTree(configurations.jre.singleFile) }){
into 'jre'
}
from({ zipTree(configurations.cert.singleFile) }){
into 'cert'
}
into 'build/req'
}
//task setVersion(type: Copy) {
// include "src/main/java/de/fzi/ekgeditor/data/Constants.java"
// filter{ it.replaceAll('ECGEDITOR_VERSION', '1.0.0')}
//}
repositories {
maven {
url = 'https://dev.movisens.com/artifactory/libs-release-local'
credentials {
username = "${artifactory_user}"
password = "${artifactory_password}"
}
}
jcenter()
maven { url "https://jitpack.io" }
}
installDist {
dependsOn << build
dependsOn << requirements
}
//build {
// dependsOn << setVersion
//}
distributions {
main {
contents {
from('build/libs/oseaQrsDet/shared') {
include '*.dll'
into 'lib'
}
from('build/libs/oseaQrsDet2/shared') {
include '*.dll'
into 'lib'
}
}
}
}