Open-RIO / ToastAPI

An Open Source robot API for FRC - The Best thing since Sliced Bread
MIT License
71 stars 12 forks source link

IDEA fails to run Toast module #41

Open arilotter opened 8 years ago

arilotter commented 8 years ago

Following the instructions in the Wiki, after generating an IDEA project file, a Gradle module simulation build fails with the following error: Exception in thread "main" java.lang.ClassNotFoundException: jaci.openrio.toast.core.ToastBootstrap at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264)

arilotter commented 8 years ago

I can fix the issue by adding the Toast jar as a compile dependency in the module settings.

JaciBrunning commented 8 years ago

Can you please attach a copy of your build.gradle file?

JaciBrunning commented 8 years ago

Also, which version of IntelliJ are you using?

arilotter commented 8 years ago

`/* This is the default build.gradle for Toast modules @author Jaci /

buildscript { repositories { mavenCentral() maven { name = "GradleRIO" url = "http://dev.imjac.in/maven" } } dependencies { classpath group: 'jaci.openrio.gradle', name: 'GradleRIO', version: '+', classifier: 'Toast' //Change this line if you wish to Update GradleRIO } }

apply plugin: 'java' apply plugin: 'idea' apply plugin: 'eclipse' apply plugin: 'maven' apply plugin: 'GradleRIO' //Apply the GradleRIO plugin

repositories { maven { name = "Toast" url = "http://dev.imjac.in/maven" } }

gradlerio.team = "865" //Your FRC team number (e.g. 5333 for team 'Can't C#', or 47 for Chief Delphi) //gradlerio.rioIP = "10.53.33.20" //Uncomment to specify the IP address of the RIO gradlerio.deployFile = "toast/modules/${archivesBaseName}.jar"

dependencies { compile group: 'jaci.openrio.toast', name: 'Toast', version: '+' //Change this line to update Toast } `

build.gradle generated by toast init, running idea 15.0.5

CS-5 commented 8 years ago

IntelliJ IDEA 2016.2.1 here... same issue.

build.gradle: `/* This is the default build.gradle for Toast modules @author Jaci /

buildscript { repositories { mavenCentral() maven { name = "GradleRIO" url = "http://dev.imjac.in/maven" } } dependencies { classpath group: 'jaci.openrio.gradle', name: 'GradleRIO', version: '+', classifier: 'Toast' //Change this line if you wish to Update GradleRIO } }

apply plugin: 'java' apply plugin: 'idea' apply plugin: 'eclipse' apply plugin: 'maven' apply plugin: 'GradleRIO' //Apply the GradleRIO plugin

repositories { maven { name = "Toast" url = "http://dev.imjac.in/maven" } }

gradlerio.team = "4050" //Your FRC team number (e.g. 5333 for team 'Can't C#', or 47 for Chief Delphi) //gradlerio.rioIP = "10.53.33.20" //Uncomment to specify the IP address of the RIO gradlerio.deployFile = "toast/modules/${archivesBaseName}.jar"

dependencies { compile group: 'jaci.openrio.toast', name: 'Toast', version: '+' //Change this line to update Toast } `

JaciBrunning commented 8 years ago

We've been having the same issue with other projects running the 2016 version of IntelliJ. It seems that the 'idea' gradle plugin is causing issues and breaking compatibility. If you run gradlew idea --refresh-dependencies, it may start working. I'll take a further look when I get around to updating my IntelliJ installation

keplersj commented 7 years ago

Have not been having this issue at all with GradleRIO and IntelliJ.