[Fixed] Error in build.gradle

So I’m setting up an auto-build of the sponge coremod using jenkins, upon starting a build of sponge I get [code]FAILURE: Build failed with an exception.

  • Where:
    Build file ‘/var/lib/jenkins/workspace/Sponge/build.gradle’ line: 271

  • What went wrong:
    A problem occurred evaluating root project ‘Sponge’.

Could not find property ‘javadoc’ on task set.

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

BUILD FAILED

Total time: 1 mins 5.739 secs
Build step ‘Invoke Gradle script’ changed build result to FAILURE
Build step ‘Invoke Gradle script’ marked build as failure
Archiving artifacts
Finished: FAILURE[/code]
I have never used gradle outside of jenkins, but to me this seems like a non me error. I am running gradle 2.3, and have set the java version to be java 7 update 76. if there is anymore info you need, don’t hesitate to ask.

**EDIT:**The Sponge API builds just fine with the same gradle and java version.
**EDIT (2):**I forgot to gradle setupDecompWorkspace --refresh-dependencies before jenkins compiles it.
EDIT (3) Or not [code]
FAILURE: Build failed with an exception.

  • What went wrong:
    Task ‘setupDecompWorkspace’ not found in root project ‘SpongeAPI’.

  • Try:
    Run gradle tasks to get a list of available tasks. Run with --stacktrace option
    to get the stack trace. Run with
    -info
    or
    -debug
    option to get more log output.

BUILD FAILED

Total time: 46.912 secs[/code] I got this after running gradle setupDecompWorkspace --refresh-dependencies

Yeah I did that :slight_smile: Now I am having issues with Jenkins crashing in the middle of the build. Not sure what to do. (Working with @The_Doctors_Life )

If I remember reading correctly somewhere in forge gradle docs, CI integration is best done with a different setup command then a full decomp workspace setup.

:confused: Not entirely sure.

Well, I think I got it working (no guarantees) but now java is running out of heap space. Time to increase the swap space, see if that helps. Any advice?

Guys, setupCIWorkspace all the way. And the SpongeAPI doesn’t depend on forge and doesn’t use the FG plugin, so the task isn’t available.

2 Likes

That was the command I had remembered seeing. Thanks for stating it.

Yea @RobodudeMC, Use that as it will make the setup on software like jenkins much easier.
I have not used it personally myself, however from what I read. It is supposed to be the best option for build servers.

It is faster than the alternatives, as it only runs the tasks essential for building. It doesn’t decompile or setup the dev workspace. It is also automatically run when you run the build task with the FG plugin enabled. So technically all you should need is gradlew build.

Ok, thanks a lot @TBotV63 . Now we have another issue though. I’m getting very very tired of these errors. sigh

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':runtime'.
> Could not resolve ninja.leaping.configurate:configurate-hocon:1.0-SNAPSHOT.
  Required by:
      org.spongepowered:Sponge:1.8-1334-1.1DEV-0 > org.spongepowered:SpongeAPI:1.1-SNAPSHOT
   > Unable to load Maven meta-data from https://libraries.minecraft.net/ninja/leaping/configurate/configurate-hocon/1.0-SNAPSHOT/maven-metadata.xml.
      > Could not GET 'https://libraries.minecraft.net/ninja/leaping/configurate/configurate-hocon/1.0-SNAPSHOT/maven-metadata.xml'. Received status code 403 from server: Forbidden

yep, seems like this one is really sponges fault

The current build for Sponge is broken because the SpongeAPI submodule reference is out of date.
Hopefully someone will update the ref soon. Needs to be at least to this commit:

1 Like

It works now.<lool newb

1 Like