-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
141 lines (122 loc) · 4.6 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
buildscript {
repositories{
mavenCentral()
}
dependencies {
classpath group: 'com.github.rodionmoiseev.gradle.plugins', name: 'idea-utils', version: '0.3-rc4'
}
}
// Apply the java plugin to add support for Java
apply plugin: 'java'
// Apply the idea plugin to add support for IntelliJ IDEA
apply plugin: 'idea'
apply plugin: 'idea-utils'
/* We use Java 1.8 */
sourceCompatibility = 1.8
targetCompatibility = 1.8
// In this section you declare where to find the dependencies of your project
repositories {
// use local maven first
mavenLocal()
// use jcenter first since it is faster and _should_ have all stuff Maven also has
jcenter()
// Use 'maven central' for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
mavenCentral()
}
// In this section you declare the dependencies for your production and test code
dependencies {
// compile 'com.airhacks:afterburner.fx:1.6.3'
compile "org.encog:encog-core:3.3.0"
compile "com.google.inject:guice:4.0"
compile "com.google.inject.extensions:guice-assistedinject:4.0"
compile "com.cathive.fx:fx-guice:8.0.0"
// include all local libs, here OpenCV since no Maven support yet, else use JavaCV
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile "junit:junit:4.12"
testCompile "org.mockito:mockito-all:1.10.19"
testCompile "org.jukito:jukito:1.4.1"
testCompile 'org.assertj:assertj-core:3.3.0'
}
sourceSets {
main.java.srcDir 'src/main/java'
test.java.srcDir 'src/test/java'
main.resources.srcDir 'src/main/resources'
test.resources.srcDir 'src/test/resources'
}
idea {
project {
vcs {
vcs = 'Git'
}
runConfigurations {
main {
type = 'Application'
name = "Run it"
mainClass = 'de.thatsich.openfx.OpenFX'
vmOptions = '-Djava.library.path="$MODULE_DIR$/dll"'
isDefault = true
}
// test {
// type = 'JUnit'
// name = "Test it"
// vmOptions = '-Djava.library.path="$MODULE_DIR$/dll"'
// }
}
}
// workspace.iws.withXml { provider ->
// // Default application run configuration
// def applicationDefaults = provider.node.component.find { it.@name == 'RunManager' }.configuration.find {
// it.@type == 'Application'
// }
// if (applicationDefaults != null) {
// applicationDefaults.module.@name = 'BachelorOpenCV'
//
// applicationDefaults.option.find { it.@name == 'MAIN_CLASS_NAME' }.@value = 'Main'
// applicationDefaults.option.find {
// it.@name == 'VM_PARAMETERS'
// }.@value = '-Djava.library.path="$MODULE_DIR$/dll"'
// applicationDefaults.option.find { it.@name == 'WORKING_DIRECTORY' }.@value = 'file://$MODULE_DIR$'
// }
//
// // default junit run configuration
// def jUnitDefaults = provider.node.component.find { it.@name == 'RunManager' }.configuration.find {
// it.@type == 'JUnit'
// }
// if (jUnitDefaults != null) {
// jUnitDefaults.module.@name = 'BachelorOpenCV'
//
// jUnitDefaults.option.find { it.@name == 'PACKAGE_NAME' }.@value = 'de.thatsich.openfx'
// jUnitDefaults.option.find { it.@name == 'TEST_OBJECT' }.@value = 'package'
// jUnitDefaults.option.find {
// it.@name == 'VM_PARAMETERS'
// }.@value = '-ea -Djava.library.path="$MODULE_DIR$/dll"'
// jUnitDefaults.option.find { it.@name == 'WORKING_DIRECTORY' }.@value = 'file://$MODULE_DIR$'
// }
//
// // actual app run configuration
// def application = provider.node.component.find { it.@name == 'RunManager' }.configuration.find {
// it.@type == 'Application' && it.@name == 'OpenFX'
// }
// if (application == null) {
// def clonedNode = new XmlParser().parseText(XmlUtil.serialize(applicationDefaults))
// clondeNode.@name = 'OpenFX'
// provider.node.component.find { it.@name == 'RunManager' }.append(clonedNode)
// }
// }
module {
//and some extra dirs that should be excluded by IDEA
excludeDirs += file('.gradle')
excludeDirs += file('.idea')
//if you love browsing Javadoc
downloadJavadoc = true
//and love reading sources :)
downloadSources = true
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.11'
}
tasks.withType(Test) {
systemProperty "java.library.path", "dll"
}