Hello! I'm interested in attempting to build Gradl...
# community-support
m
Hello! I'm interested in attempting to build Gradle from source, without using a binary bootstrap. Are there people in here interested in that, or having experience/knowledge with attempts to do so?
Would someone know what is the last version of Gradle that can be built using Ant? At least this effort from 2021 suggests that Gradle 5 could still be built using Ant: https://framagit.org/tyreunom/guix-more/-/blob/master/more/packages/gradle.scm#L89
t
debian is providing gradle 4. https://packages.debian.org/search?keywords=gradle You can check what they are doing.
e
IIRC @Julien Plissonneau Duquène has been working on that
m
@TheGoesen how useful are these older gradle versions?
t
ahem define what 'useful' means... I personally would guess that building anything close to a current version of gradle in a bootstrapable would take an enormous effort. like @ephemient said it came up a few months ago, but I dont know if there are realistic efforts to get gradle bootstrapable anytime (soon)..
m
Our idea for Guix is to implement was Nix has done, which is to run
gradle build
while an in-between proxy (mitm-cache) records all the artifacts that gradle fetched during the build.
mitm-cache
is then able to playback these artifacts in a containerized, isolated environment.
One issue with this would be that the artifacts downloaded are binaries, right? In Guix we strive to build everything from source... is there a toggle to tell Gradle "fetch the sources instead of the binaries, and build them anew", similar to what cargo does for Rust?
Source dependencies https://blog.gradle.org/introducing-source-dependencies seems to be designed to do this? Would it work for this use case?
v
Very unlikely
Besides that they are still experimental
m
OK, that's unfortunate. Otherwise technically dependencies that Gradle fetches dynamically during the build can be provided pre-built in a local Maven file-backed repository, IIUC?
v
Sure
I'd recommend the same as the others did. Look at what Debian does / try to do for newer versions.
m
Thanks for the help!
e
for many versions now, Gradle depends on fairly recent versions of Kotlin and Gradle, and Kotlin depends on Gradle and Kotlin. so if you want to avoid external binaries, you either have a very long bootstrapping path, or create a new build system for them (which seems to be what Debian's current efforts are focused on). if that's the approach you want to try, you should work together on it instead of separately