Fail to build with gradle:

Dear all,

Following my previous post (SVG export and column width), I’m trying to build jalview. I have syntax error in the gradle file, which I could fix, but then I hit an error I couldn’t solve:

* Exception is:
java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
        at com.install4j.gradle.Install4jPlugin.apply(Install4jPlugin.kt)
        at com.install4j.gradle.Install4jPlugin.apply(Install4jPlugin.kt:6)
        at org.gradle.api.internal.plugins.ImperativeOnlyPluginTarget.applyImperative(ImperativeOnlyPluginTarget.java:42)
        at org.gradle.api.internal.plugins.RuleBasedPluginTarget.applyImperative(RuleBasedPluginTarget.java:50)
        at org.gradle.api.internal.plugins.DefaultPluginManager.addPlugin(DefaultPluginManager.java:165)
        at org.gradle.api.internal.plugins.DefaultPluginManager.access$200(DefaultPluginManager.java:47)
...

Any idea ? I’m building on Debian or Ubuntu (I have the same error on the two platforms).

I’d like to post the diff for the syntax errors too, but I don’t have the right to upload files here.

Thanks

Vincent

Hi Vincent - can you create a new issue on issues.jalview.org ?

Please also incude the base git commit you are working from…

@VincentFourmond we will be getting together on Jitsi at 2pm BST/15h Paris if you want to say hello. Head over to the gitter.im/jalview/developers chat room for the link

Hi Vincent,

A syntax error in the build.gradle file sounds like a symptom of some other mismatch, possibly the version of gradle that you’re using.

From memory, the current build.gradle in the develop branch needs a gradle version between 6.5 and 7.x (i.e. less than 8) to be able to build. It’s possible that the default in debian is an older gradle (apologies I can’t check just now – linux laptop at home!) or in other distributions newer (since 8.1.1 is the current version)!
I use the gradle binary download from here: https://gradle.org/next-steps/?version=7.6.1&format=bin which unzips completely self-contained in its own directory. Just use the gradle-7.6.1/bin/gradle shell script to run gradle (either link to it from a directory already in your PATH, or add that folder to the start of your PATH, or call it directly using a full path to it).

Aside from that, the error you’re seeing appears to be from the install4j gradle module. Install4j is the installation packaging software we use and you will probably only be able to use that part of the build if you have a locally installed install4j with a licence. Having said that, if you are building the shadowJar (recommended) then you won’t need that and the install4j part shouldn’t get used at all.

Let us know how you get on with version 7.6 of gradle. If there’s still a problem, post the syntax error and we can hopefully figure out what’s causing that.

Ben