This repository has been archived by the owner on Dec 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
57 lines (47 loc) · 1.56 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
apply plugin: 'java'
apply plugin: 'application'
sourceCompatibility = 1.7
version = '1.0'
compileJava.options.encoding = 'UTF-8'
mainClassName = 'org.robot.lejos.ev3.RobotApplication'
jar {
manifest {
attributes 'Implementation-Title': 'Gradle Lego/Lejos Mindstorms EV3 Example Project', 'Implementation-Version': version, 'Main-Class': mainClassName
}
// note this builds one fat jar and it is not recommended for production use - just for illustration purpose
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
configurations {
sshAntTask
provided
}
sourceSets {
main.compileClasspath += configurations.provided
test.compileClasspath += configurations.provided
test.runtimeClasspath += configurations.provided
}
repositories {
mavenCentral()
flatDir {
dirs System.getenv('EV3_HOME')+'/lib/ev3'
}
}
dependencies {
sshAntTask 'org.apache.ant:ant-jsch:1.9.4', 'jsch:jsch:0.1.29'
compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
provided group: 'lejos', name: 'ev3classes', version: '1.0'
testCompile group: 'junit', name: 'junit', version: '4.+'
}
test {
systemProperties 'property': 'value'
}
task deployEV3 << {
ant.taskdef(name: 'scp', classname: 'org.apache.tools.ant.taskdefs.optional.ssh.Scp', classpath: configurations.sshAntTask.asPath)
ant.scp(todir: ev3_username+'@'+ev3_server+':/home/lejos/programs',
password: ev3_password,
verbose: 'true') {
fileset(dir: './build/libs') {
include(name: '**/*.jar')
}
}
}