forked from stephanmg/VRL-Neurolucida-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
55 lines (46 loc) · 1.57 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
apply plugin: 'java'
sourceCompatibility = '1.6'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
task wrapper(type: Wrapper) {
gradleVersion = '1.9'
}
if (!hasProperty('mainClass')) {
ext.mainClass = 'eu.mihosoft.vrl.codetools.Main'
}
repositories {
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
def loadProperties(String sourceFileName) {
def config = new Properties()
def propFile = new File(projectDir,sourceFileName)
if (propFile.isFile()) {
config.load(new FileInputStream(propFile))
for (Map.Entry property in config) {
ext.set(property.key, property.value)
}
}
}
// loads the property file
loadProperties('build.properties')
// add dependencies
dependencies {
compile (group: 'eu.mihosoft.vrl', name: 'vrl', version: '0.4.2.8.5-SNAPSHOT')
compile (dir: "./lib/", includes:['*.jar'])
testCompile group: 'org.easymock', name: 'easymock', version: '3.3.1'
compile fileTree(dir: vrldir+"/plugins/", includes:['*.jar'])
compile fileTree(dir: "lib/", includes:['*.jar'])
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile fileTree(dir: vrldir+"/plugins/", includes:['*.jar'])
}
// compiles and installs the vrl plugin to the specified folder
task installVRLPlugin(dependsOn: [clean,jar]) << {
println(">> copying vrl plugin to: " + vrldir+"/plugin-updates")
copy {
from buildDir.getPath()+"/libs/"+rootProject.name + ".jar"
into vrldir+"/plugin-updates"
include '**/*.jar'
}
}