Rpm packaging with gradle

So I want to package some Java projects that use gradle to build and from what I can gather, gradle used to be in Fedora but no longer is at this point in time. The gradlew wrapper scripts included don’t work when building with mock, and I can’t find any documentation for how I’m supposed to package gradle projects. Is there another way to do this that doesn’t depend on gradle?

1 Like

From Ask Fedora to Project Discussion

Added package-maintainers

Well, gradle is just one of many build systems for java. You could use maven or ant.

gradle used to be in Fedora but no longer is at this point in time

The reason for this was because the gradle upstream maintainers decided to build gradle with gradle for all future versions. This kind of build process is not allowed in Fedora.

The gradlew wrapper scripts included don’t work when building with mock

They don’t work because they rely on downloading their own version of gradle. This requires an active internet connection, which you don’t have in mock (and also koji).

1 Like

Well, gradle is just one of many build systems for java. You could use maven or ant.

I did attempt to use maven with no success, which led me to assume that Java projects can only be built with their respective build process(basically however it says to build in the readme I believed was the only way to build it?), maybe I did something wrong? The macros for maven did feel unnecessarily complicated to me and nothing like other macros. I didn’t attempt to use ant yet as I assumed it wouldn’t work, but I will try that next.

The reason for this was because the gradle upstream maintainers decided to build gradle with gradle for all future versions. This kind of build process is not allowed in Fedora.

I’m having a bit of trouble understanding the issue, you implied that Java projects can be built with any build system like ant so wouldn’t the maintainer just be able to build gradle with ant or maven instead of using gradle like the developers of gradle do?

They don’t work because they rely on downloading their own version of gradle. This requires an active internet connection, which you don’t have in mock (and also koji).

Yes I did figure that out from the log, I just thought I’d include that bit in my question to filter out unhelpful responses.

Thanks for the information, hopefully ant works despite my assumption that it wouldn’t.

There is no prohibition in Fedora from packaging software that needs itself to build. There are several such packages currently in Fedora. The real problem is that gradle has a ton of dependencies that change frequently, some of them require fixed versions of other packages, etc. It’s simply a nightmare to maintain. Hence the retirement message for the former Fedora gradle package: “out of date, broken, fails to build, basically unmaintainable”.

1 Like