Closed joshuaferrara closed 6 years ago
Thanks for the interest, I think you are the first person I don't know trying to use this, so you may be in a little bit of a guinea pig situation for a couple days.
It looks like when I was writing the docs I was using a local maven repo, and those intermediate versions didn't get published. I'll update the plugin to point to the release I made last night which includes game data, and update the documentation.
In the meantime, you can add a line like this to your build script
snobotSimVersions {
snobotSimVersion = "0.7.0"
}
You can use ours as an example https://github.com/ArcticWarriors/snobot-2018/blob/master/RobotCode/snobot2018/build.gradle
Awesome, thank you so much! After looking at your build.gradle
I created a new GradleRIO workspace and used the build.gradle
below. After running gradlew build
and gradlew eclipse
, I was in working order. Thanks again and good luck this season!
buildscript {
repositories {
mavenLocal()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
}
plugins {
id "java"
id "eclipse"
id "idea"
id "jaci.openrio.gradle.GradleRIO" version "2018.01.07"
id "com.snobot.simulator.plugin.SnobotSimulatorPlugin" version "2018.01.01"
}
apply plugin: com.snobot.simulator.plugin.SnobotSimulatorPlugin
snobotSimVersions {
snobotSimVersion = "0.7.0"
}
def TEAM = 5805
def ROBOT_CLASS = "com.smblyrequired.SMbly2018.Robot"
// Define my targets (RoboRIO) and artifacts (deployable files)
// This is added by GradleRIO's backing project EmbeddedTools.
deploy {
targets {
target("roborio", jaci.openrio.gradle.frc.RoboRIO) {
team = TEAM
}
}
artifacts {
artifact('frcJava', jaci.openrio.gradle.frc.FRCJavaArtifact) {
targets << "roborio"
}
}
}
// Defining my dependencies. In this case, WPILib (+ friends), CTRE Toolsuite (Talon SRX)
// and NavX.
dependencies {
compile wpilib()
compile ctre()
compile navx()
compile openrio.powerup.matchData()
testCompile snobotSimCompile()
testCompile snobotSimJavaCompile()
}
// Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar')
// in order to make them all available at runtime. Also adding the manifest so WPILib
// knows where to look for our Robot Class.
jar {
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
manifest jaci.openrio.gradle.GradleRIOPlugin.javaManifest(ROBOT_CLASS)
}
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
}
repositories {
mavenLocal()
mavenCentral()
}
Hello,
I'm running into some issues with the GradleRIO install of SnobotSim.
I've followed the install instructions on the wiki, mainly, adding the line to the
plugins
block, as well as thetestCompile
lines to my build.gradle file.When running
./gradlew build
initially, I get the output below:Following that, I ran
./gradlew eclipse
to generate the eclipse project. Output is below:Now, the eclipse project opens fine, though I can't get the simulator started while following the
Run As
instructions for Eclipse; the package for SnobotSim does not show up in the search box for Java Applications in Eclipse.I've duplicated this on both Windows 10 and Ubuntu 16.04.3. I'd love to get the programmers on my team using this sim before our drive base is built - it looks really well put together.
Thanks for your help! I've included my
build.gradle
file below.