SpongeStart Gradle plugin

Tried 2016 eap as well and I am not happy with it

I believe that the issues in Intellij with gradle sourcesets were fixed - JetBrains hasn’t done another release with the fixes yet, though.

3 Likes

How about adding this gradle plugin to the official plugins repo? Gradle - How do I get my plugin into the portal?

plugins { id "com.github.qixalite" version "1.4" } (or something like that)

would be the only thing the plugin developer that wants to use SpongeStart had to add to the buildscript. Would be cool!

He did… :wink:

1 Like

Lol, uhm, cool! :smile: Didn’t expected that!

2 Likes

I only added it recently tho :slight_smile:. Anyway I updated the build.gradle examples.

1 Like

I run setupServer but it does not generate main class. Profile is generated though.

If your using idea 2016 you will need to add the start library manually. It’s located here:

windows: %UserProfile%/.gradle/caches/spongestart/start
linux/mac: ~/.gradle/caches/spongestart/start

We will have to wait until jetbrains releases their gradle sourceset fix as @Aaron1011 mentioned.

1 Like

I’ve (finally) managed to get the setup working but gradle tasks --all doesn’t show me any task that looks like it’ll run the server / client. How do I run server / client?

In IntelliJ this plugin generates 2 run configurations: Forge and Vanilla. Select one and hit run.

I don’t use IntelliJ, I use Eclipse.

15 characters…

Edit:
Maybe you can start this MainClass manually. Or simply use IntelliJ, it is better :thumbsup:

1 Like

Trying to do that results in class not found. What’s your classpath setup?

I have done what the instructions of this plugin say. The source of this plugin is online. I haven’t changed anything.

I’ve done the same thing and I’ve even tried in IntelliJ IDEA. It does not generate the run configurations and the StartServer class cannot be found.

Edit: Nevermind, I read the above posts.

Now I get another problem… Running the server does not run my Sponge plugin.
I’ve tried with both (manually created) Forge and Sponge configurations, using the instructions in the README.md.

Time to download eclipse and see if I can get it working I guess.

Only thing I could think of is that their isn’t an @Plugin class in your classpath. Also if you need to manually create your run configuration I think something might be wrong.

Can you show me these things:

  1. build.gradle
  2. classpath (press f4 when selecting your project in intelij)

With 1.4.3 I fixed the problems with idea 2016. Although it does break other versions.

3 Likes

when running setupServer …

Version: 1.4.3

That should be fixed in 1.4.5 I think. Haven’t checked yet but my issue on github about this is closed on assume he fixed it

1 Like