Skip to content

Commit bb2973c

Browse files
committed
# Conflicts: # .gitignore
2 parents ab971a5 + 197b44b commit bb2973c

File tree

37 files changed

+288
-206
lines changed

37 files changed

+288
-206
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: java
22
jdk:
3-
- oraclejdk8
3+
- openjdk11
44
before_install:
55
- chmod +x gradlew
66
notifications:

README.md

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,38 @@
11
# ev3dev-lang-java /examples
22

3-
This repository store a set of examples ready to use with the
3+
This repository store a set of examples ready to use with the
44
ev3dev-lang-java libraries.
55

6+
## Checking it out
7+
8+
Before proceeding further, you need to change the brick connection parameters
9+
in the `config.gradle` file in the main directory.
10+
11+
You can build the project and upload all programs with their dependencies with these commands:
12+
```sh
13+
./gradlew uploadGradleLibraries
14+
./gradlew deploy
15+
```
16+
17+
You can then run them from the ev3dev menu in the `examples` subdirectory.
18+
19+
Alternatively, you can also work only with one project at a time:
20+
```sh
21+
./gradlew :opencv:deploy # only upload 'opencv' project
22+
./gradlew :opencv:run # only run already uploaded build of 'opencv' project
23+
./gradlew :opencv:deployRun # only upload and run 'opencv' project
24+
```
25+
26+
To change the class to be run in some example project, modify its `config.gradle` file.
27+
If you run want to run the program from ev3dev menu, you will have to reupload it.
28+
29+
To remove all samples from the brick, just run:
30+
```sh
31+
./gradlew undeploy
32+
```
33+
34+
## Contents
35+
636
Take a look the following examples to discover some features included with this Java project.
737

838
**EV3Dev-lang-Java:**
@@ -68,19 +98,19 @@ Take a look the following examples to discover some features included with this
6898

6999
- lejos.robotics.navigation
70100
- [PilotConfig](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/pilot/PilotConfig.java)
71-
- [PilotConfig2](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/pilot/PilotConfig2.java)
72-
- [DifferentialPilotStopTest](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/pilot/DifferentialPilotStopTest.java)
73-
- [DifferentialPilotTest1](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/pilot/DifferentialPilotTest1.java)
74-
- [DifferentialPilotTest9](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/pilot/DifferentialPilotTest9.java)
75-
- [MoveControllerTest1](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/navigator/MoveControllerTest1.java)
76-
- [MoveControllerTest2](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/navigator/MoveControllerTest2.java)
77-
- [NavigatorTest1](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/navigator/NavigatorTest1.java)
78-
- [NavigatorTest2](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/navigator/NavigatorTest2.java)
79-
- [NavigatorTest3](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/navigator/NavigatorTest3.java)
80-
- [NavigatorTest4](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/navigator/NavigatorTest4.java)
101+
- [PilotConfig2](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/pilot/PilotConfig2.java)
102+
- [DifferentialPilotStopTest](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/pilot/DifferentialPilotStopTest.java)
103+
- [DifferentialPilotTest1](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/pilot/DifferentialPilotTest1.java)
104+
- [DifferentialPilotTest9](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/pilot/DifferentialPilotTest9.java)
105+
- [MoveControllerTest1](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/navigator/MoveControllerTest1.java)
106+
- [MoveControllerTest2](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/navigator/MoveControllerTest2.java)
107+
- [NavigatorTest1](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/navigator/NavigatorTest1.java)
108+
- [NavigatorTest2](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/navigator/NavigatorTest2.java)
109+
- [NavigatorTest3](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/navigator/NavigatorTest3.java)
110+
- [NavigatorTest4](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/navigator/NavigatorTest4.java)
81111
- lejos.robotics.objectdetection
82-
- [FeatureAvoider](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/feature/FeatureAvoider.java)
83-
- [FeatureAvoider2](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/feature/FeatureAvoider2.java)
84-
- [FeatureAvoider3](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/feature/FeatureAvoider3.java)
112+
- [FeatureAvoider](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/feature/FeatureAvoider.java)
113+
- [FeatureAvoider2](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/feature/FeatureAvoider2.java)
114+
- [FeatureAvoider3](https://github.com/ev3dev-lang-java/examples/blob/develop/ev3dev-lang-java/src/main/java/lejos/navigation/feature/FeatureAvoider3.java)
85115

86116

build.gradle

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
//Gradle file library ev3dev-lang-java / examples
22
//Author: Juan Antonio Breña Moral
33

4-
allprojects {
4+
buildscript {
5+
repositories {
6+
jcenter()
7+
mavenCentral()
8+
maven {
9+
url "https://plugins.gradle.org/m2/"
10+
}
11+
maven { url "https://jitpack.io" }
12+
}
13+
}
14+
15+
subprojects {
516
version = "2.4.16"
617

718
repositories {
@@ -14,16 +25,16 @@ allprojects {
1425
apply plugin: 'idea'
1526

1627
dependencies {
17-
compile("com.github.ev3dev-lang-java:ev3dev-lang-java:2.5.3")
18-
compile("com.github.ev3dev-lang-java:lejos-navigation:0.2.0")
28+
implementation("com.github.ev3dev-lang-java:ev3dev-lang-java:2.5.3")
29+
implementation("com.github.ev3dev-lang-java:lejos-navigation:0.2.0")
1930

20-
compile("ch.qos.logback:logback-classic:1.2.3")
31+
implementation("ch.qos.logback:logback-classic:1.2.3")
2132
}
2233

2334
//Compile
2435
compileJava {
25-
sourceCompatibility = 1.8
26-
targetCompatibility = 1.8
36+
sourceCompatibility = 11
37+
targetCompatibility = 11
2738
}
2839
}
2940

config.gradle

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
import java.nio.file.Paths
12

2-
remotes {
3-
ev3dev {
4-
host = '10.0.1.3'
5-
user = 'robot'
6-
password = 'maker'
7-
}
3+
// Project configuration
4+
brick.pref {
5+
// Brick connection parameters //
6+
sshHost = "10.0.0.89"
7+
sshUser = "robot"
8+
sshPassword = "maker"
9+
10+
// Do not use stuff embedded in manifest (for easier main class changes)
11+
useEmbeddedPaths = false
12+
}
13+
14+
brick.paths {
15+
wrapperDir = "/home/robot/examples"
816
}

demo-2.4.16/build.gradle

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
1+
version = '0.1.0-SNAPSHOT'
12

23
dependencies {
3-
//compile group: 'com.github.ev3dev-lang-java', name: 'ev3dev-lang-java', version: '2.4.16'
4+
//implementation group: 'com.github.ev3dev-lang-java', name: 'ev3dev-lang-java', version: '2.4.16'
45

5-
compile "com.github.ev3dev-lang-java:ev3dev-lang-java:0.7.0"
6-
//compile("com.github.ev3dev-lang-java:RPLidar4J:v0.3.2-SNAPSHOT")
7-
//compile group: 'javazoom', name: 'jlayer', version: '1.0.1'
8-
9-
annotationProcessor("org.projectlombok:lombok:1.16.20")
10-
compileOnly("org.projectlombok:lombok:1.16.20")
11-
testCompileOnly("org.projectlombok:lombok:1.16.20")
6+
implementation "com.github.ev3dev-lang-java:ev3dev-lang-java:0.7.0"
7+
//implementation("com.github.ev3dev-lang-java:RPLidar4J:v0.3.2-SNAPSHOT")
8+
//implementation group: 'javazoom', name: 'jlayer', version: '1.0.1'
129

10+
annotationProcessor("org.projectlombok:lombok:1.18.8")
11+
compileOnly("org.projectlombok:lombok:1.18.8")
12+
testCompileOnly("org.projectlombok:lombok:1.18.8")
13+
}
1314

15+
jar {
16+
manifest {
17+
attributes("Implementation-Title": "EV3Dev-lang-java / Demos for 0.7.0",
18+
"Implementation-Version": project.version,
19+
"Implementation-Vendor": "Juan Antonio Breña Moral"
20+
)
21+
}
1422
}

demo-2.4.16/config.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Subproject configuration
2+
brick.pref {
3+
// Main class //
4+
mainClass = "examples.Demo"
5+
}

demo-2.4.16/src/main/resources/META-INF/MANIFEST.MF

Lines changed: 0 additions & 10 deletions
This file was deleted.

demo/build.gradle

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
1+
version = '0.1.0-SNAPSHOT'
12

23
dependencies {
3-
compile("com.github.ev3dev-lang-java:ev3dev-lang-java:0.7.0")
4-
compile("com.github.ev3dev-lang-java:RPLidar4J:v0.3.2-SNAPSHOT")
5-
compile group: 'javazoom', name: 'jlayer', version: '1.0.1'
4+
implementation group: 'com.github.ev3dev-lang-java', name: 'ev3dev-lang-java', version: '0.7.0'
5+
implementation group: 'com.github.ev3dev-lang-java', name: 'RPLidar4J', version: 'v0.3.2-SNAPSHOT'
6+
implementation group: 'javazoom', name: 'jlayer', version: '1.0.1'
67

8+
annotationProcessor("org.projectlombok:lombok:1.18.8")
9+
compileOnly("org.projectlombok:lombok:1.18.8")
10+
testCompileOnly("org.projectlombok:lombok:1.18.8")
11+
}
12+
13+
jar {
14+
manifest {
15+
attributes("Implementation-Title": "EV3Dev-lang-java / Demos for 0.7.0",
16+
"Implementation-Version": project.version,
17+
"Implementation-Vendor": "Juan Antonio Breña Moral"
18+
)
19+
}
720
}

demo/config.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Subproject configuration
2+
brick.pref {
3+
// Main class //
4+
mainClass = "examples.DemoStop"
5+
}

demo/src/main/resources/META-INF/MANIFEST.MF

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)