Need some help Importing Sponge into IntelliJ

Hey I posted this earlier and just got around to testing it, but It won’t seem to work for me when I run my build.gradle, did you run into anything like this?

What do you mean by ‘running’ build.gradle?

I seem to be getting the same issue. Could you provide a copy of your build.gradle?

As MUCH information as you would be kind enough to provide. link the video here and ill watch it for sure.

Yeah including how to debug the plugin would be nice. :slight_smile:

This Is great stuff :slight_smile:

As you said there are other ways to debug your plugin. Here is one:

Instead of building a new artifact just add the plugin to the classpath. Forge will automagically load it.

The easiest way to do that is to create a new empty module.
(Don’t edit SpongeForge_java6 as it gets reset each time you do a gradle import)
Then add the SpongeForge_java6 module and your plugins module to it as a dependency.

Use this newly created module as classpath for your run configuration.
Add before launch “build project” (if you removed it)
done.

3 Likes

Indeed. The deed is done, your latest waxing and profundity now graces the SpongeDocs Plugin Tutorials page. I’ve just linked the playlist, it should speak for itself (literally). May the sound of Sponge Metal ring throughout the holiday season!

3 Likes

Just finished Part 2 of your playlist, and things were working up until they weren’t :confused: :slight_smile:

$ ./gradlew setupDecompworkspace --refresh-dependencies
Downloading https://services.gradle.org/distributions/gradle-3.3-bin.zip

Unzipping C:\Users\John.gradle\wrapper\dists\gradle-3.3-bin\64bhckfm0iuu9gap9hg 3r7ev2\gradle-3.3-bin.zip to C:\Users\John.gradle\wrapper\dists\gradle-3.3-bin\ 64bhckfm0iuu9gap9hg3r7ev2
Starting a Gradle Daemon (subsequent builds will be faster)
Download https://plugins.gradle.org/m2/gradle/plugin/net/minecrell/licenser/0.3/ licenser-0.3.pom
Download https://plugins.gradle.org/m2/com/github/jengelman/gradle/plugins/shado w/1.2.4/shadow-1.2.4.pom
Download https://plugins.gradle.org/m2/gradle/plugin/org/spongepowered/spongegra dle/0.8.1/spongegradle-0.8.1.pom
Download https://repo.spongepowered.org/maven/org/spongepowered/mixingradle/0.4- SNAPSHOT/mixingradle-0.4-20160617.140650-4.pom
Download https://plugins.gradle.org/m2/org/spongepowered/plugin-meta/0.4.1/plugi n-meta-0.4.1.pom

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘SpongeForge’.

Could not resolve all dependencies for configuration ‘:classpath’.
Could not resolve net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT.
Required by:
project :
Could not resolve net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT.
Unable to load Maven meta-data from http://files.minecraftforge.net/m aven/net/minecraftforge/gradle/ForgeGradle/2.2-SNAPSHOT/maven-metadata.xml.
Could not GET ‘Minecraft Forge repository forge/gradle/ForgeGradle/2.2-SNAPSHOT/maven-metadata.xml’.
Connect to files.minecraftforge.net:80 [files.minecraftforge.ne t/158.69.55.219] failed: Connection timed out: connect

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Anyone able to shed any supporting light upon what to try?
It’s been pretty much a case of rabbit-see, rabbit-do here, so anything overtly technical may leave me twitching my nose and tail :smile:

EDIT:

I ran “./gradlew setupDecompworkspace --refresh-dependencies” again and it’s doing a lot more now.
Will post a pastebin of what occurs after it’s finished, although it looks set to function based on the little I understand of what I can read.

Link for it running second time through - if it provides help in some way :slight_smile:
http://pastebin.com/hV3ar2zd