-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project status (abandoned?) #55
Comments
Thank you for bringing this up. The long answer is that I started a new job, so I lost momentum. At this job, I developed a more reliable, albeit hacky, solution for managing Gradle builds in a Nix development environment, by abusing Gradle's dependency verification feature to obtain the set of all dependencies and output hashes. The problem with the current approach is that it uses the Artifact Query Resolution API, which is essentially deprecated at this point, does not work with the configuration cache, and crucially, doesn't capture dependencies added by plugins or I have been hoping for Gradle themselves to introduce a robust API for listing dependencies without modifying the build, but I've been waiting for a while and there hasn't been anything to report on this front. Would you (and anyone else following) be interested in a reboot of this project using the aforementioned dependency-verification abuse? I have tested it with the Kotlin repository, which is huge and has a bespoke dependency-management setup, and it even works for that. |
I am interested @tadfisher I have been having varying degrees of success getting gradle2nix working. |
Thanks for the detailed answer, really appreciate it.
Sounds very interesting! I'd love to help with this, but I don't know whether I'm proficient enough in Gradle and/or Nix. |
Throwing my hat into the ring on this too, I'd be interested in helping with the dependency verification approach. In the meantime I've pulled together a few of the fixes into numtide/gradle2nix |
It might be better to direct any new effort into https://github.com/nix-community/dream2nix |
I would! I just spent a day struggling with this stuff before running into the issue with plugin dependencies, and then a couple other issues. I'd love to at least see what you have. |
AFAIK dependency verification was released with Gradle 7.4 (see release notes) on 2022-02-08 (after the last commit in this repo) and was since improved (see docs for 8.3, which is current at the time of writing). For a 2nix use-case, one aspect of the feature, namely integrity verification, would really help. When the feature came out, I also had the thought that this might be very useful for gradle2nix, but I did not follow through implementing a prototype. @tadfisher it would be quite interesting to see your proof of concept based on dependency verification. For the others that replied here: Is anyone else willing to collaborate on a new gradle2nix based on dependency verification? |
For the record: at the current moment (December 2023) gradle2nix does not work with Gradle above 6. Current stable Gradle is 8. |
I'm currently working on a proof-of-concept (tentatively, "v2") with the following improvements:
Ultimately I'd like to use this project for work, so expect to see some progress soon. |
@tadfisher are you able to provide a status update on your v2? |
I was able to get gradle2nix to work with Gradle 7.3.3 (using the https://github.com/numtide/gradle2nix fork). Anything newer didn't work due to the changes in gradle/gradle#20065. |
I think my project gradle-dot-nix should already work for more or less simple setups. I did the whole dependency fetching using ugly af python scripts, but at least it always works (on a hoping and praying basis, i just learned nix) (probably also a good starting point for better impls) |
I'm currently looking at ways to nixify my gradle, and for the record let me leave a mention of another approach on nixifying gradle by the folks at status-im, who resorted to implementing their own dependency resolver. |
I have a Please give this a try; it's much simpler and faster than the previous approach. I was able to run it against the |
The last commit was in March 2021, and there are multiple important PRs open.
@tadfisher do you plan on maintaining this project any further, or should development continue on a fork?
Some working forks were already linked in other issues, but it would be great to have a central place where development of gradle2nix can go on.
The text was updated successfully, but these errors were encountered: