Gradle plugin for LeJOS EV3

Gradle plugin that can be used to build and copy Java applications from and to the Lego Mindstorms EV3 brick

License

License

Categories

Categories

ORM Data
GroupId

GroupId

com.github.bdeneuter
ArtifactId

ArtifactId

mindstorms-plugin
Last Version

Last Version

1.2.3
Release Date

Release Date

Type

Type

jar
Description

Description

Gradle plugin for LeJOS EV3
Gradle plugin that can be used to build and copy Java applications from and to the Lego Mindstorms EV3 brick
Project URL

Project URL

https://github.com/bdeneuter/mindstorms-plugin
Source Code Management

Source Code Management

https://github.com/bdeneuter/mindstorms-plugin.git

Download mindstorms-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.bdeneuter/mindstorms-plugin/ -->
<dependency>
    <groupId>com.github.bdeneuter</groupId>
    <artifactId>mindstorms-plugin</artifactId>
    <version>1.2.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.bdeneuter/mindstorms-plugin/
implementation 'com.github.bdeneuter:mindstorms-plugin:1.2.3'
// https://jarcasting.com/artifacts/com.github.bdeneuter/mindstorms-plugin/
implementation ("com.github.bdeneuter:mindstorms-plugin:1.2.3")
'com.github.bdeneuter:mindstorms-plugin:jar:1.2.3'
<dependency org="com.github.bdeneuter" name="mindstorms-plugin" rev="1.2.3">
  <artifact name="mindstorms-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.bdeneuter', module='mindstorms-plugin', version='1.2.3')
)
libraryDependencies += "com.github.bdeneuter" % "mindstorms-plugin" % "1.2.3"
[com.github.bdeneuter/mindstorms-plugin "1.2.3"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

mindstorms-plugin

This project contains the source code for a gradle plugin for the Lego Mindstorms EV3. For an example how to use it and to learn how to install java 8 on your EV3 brick, have a look to my Mindstorms repo.

How to use it

Add the plugin to your build.gradle file

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "gradle.plugin.com.github.bdeneuter:mindstorms-plugin:1.2.0"
  }
}

apply plugin: "com.github.bdeneuter.mindstorms.ev3"

or use the new plugin api

plugins {
  id "com.github.bdeneuter.mindstorms.ev3" version "1.2.0"
}

Configure the plugin in your build.gradle file

mindstorms {
    // Your Java main class (the class with the method: public static void main(String ... args))
    main = 'com.github.bdeneuter.mindstorms.samples.HelloWorld'
    
    // Optional: The IP address from the EV3 brick. Default value is 10.0.1.1
    ip = '10.0.1.1'
    
    // Optional: the user for the EV3 brick. Default value is root
    user = 'root'
    
    // Optional: the password for the user of the EV3 brick (Don't check in paswords in repositories! If you use a password, put it in the gradle.properties in your GRADLE_HOME and assign the variable to the password field. Default value is none
    password = ''
    
    // Optional: the directory on the EV3 brick where the applications will be stored. Default is /home/lejos/programs
    home = '/home/lejos/programs'
}

The plugin will apply the java plugin and add the LeJOS EV3 Java API to your compile classpath. So you can put your source code in the src/main/java folder like a normal java project.

Adding extra dependencies

If you want to add extra dependencies:

dependencies {
    // example
    compile 'com.google.guava:guava:19.0'
}

Building

Just build your project as a normal Java project in gradle

./gradlew build

Deploy

To deploy your application to the EV3 brick.

./gradlew copyToRobot

Run

To run your application, select your application on the EV3 brick by using the menu on the brick and launch it. Or run your application from gradle with this plugin:

./gradlew launch

Shutdown the EV3 brick

./gradlew halt

Versions

Version
1.2.3
1.2.2
1.2.1
1.2.0
1.1.1
1.1.0
1.1.0-beta
1.0.0
1.0.0-beta