Hello everyone. At work, I'm trying to integrate a...
# community-support
f
Hello everyone. At work, I'm trying to integrate a new subproject (H, which uses a gradle plugin for Helm ) into a project (X) that has historically grown (over 400 lines in build.gradle.... ) with a multitude of subprojects. It is using a wrapper to use Gradle version 7.4.2. As a standalone project, H works fine with Gradle 7.4.2 and upwards. When i integrate it as a subproject it into X, IntelliJ can build the model. But once i start a Plugin related task from H it gives this error: (
Caused by: java.lang.NoClassDefFoundError: org/gradle/api/file/SyncSpec
) I'm using IntelliJ. And as i said, using the same gradle Version with the Standalone H Project it works fine. I can't find anything about this specific error. what could be the possible cause? I've attached the build.gradle files if you need it, but the one for X is very large. Apologies for that. I've left out any hints towards my company or the products. Hope that is okay.
v
I didn't read the build files, but only your text. Do you want to stop having H as standalone project and only use it as subproject of X? If the answer to this is "No", then using H as subproject of X is a very big no-no-no-never anyway, but instead you should use composite build feature so that X includes the wohle H build to use it. But either way, it is pretty unlikely that something that uses
org/gradle/api/file/SyncSpec
ever worked in Gradle 7.4.2, as this class was added in 7.5. Can you maybe provide a build
--scan
of a build where it works like you expected and one of a build that failed?
f
Interesting... Sure, I'll do that and see what happens.
@Vampire you were right. It does in fact NOT work with 7.4.2, idk how i was overseeing that. So what i tried after that was setting the gradle version to 7.5 in Project X. I was worried about breaking changes with the upgrade but that wasn't the case thankfully. Now the things are running. Thank you so much.
👌 1
v
The backwards compatibility rules of Gradle forbid a breaking change in a major version, so if there is indeed a breaking change in a minor version, that is usually a bug and often fixed in a patch version.
Except in incubating features of course