Skip to content
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

Open
lunagl opened this issue Dec 5, 2022 · 14 comments
Open

Project status (abandoned?) #55

lunagl opened this issue Dec 5, 2022 · 14 comments

Comments

@lunagl
Copy link

lunagl commented Dec 5, 2022

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.

@tadfisher
Copy link
Owner

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 buildSrc without even worse hacks.

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.

@tadfisher tadfisher pinned this issue Dec 6, 2022
@samrose
Copy link

samrose commented Dec 8, 2022

I am interested @tadfisher I have been having varying degrees of success getting gradle2nix working.

@lunagl
Copy link
Author

lunagl commented Dec 10, 2022

Thanks for the detailed answer, really appreciate it.

Would you (and anyone else following) be interested in a reboot of this project using the aforementioned dependency-verification abuse?

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.

@brianmcgee
Copy link

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

@brianmcgee
Copy link

It might be better to direct any new effort into https://github.com/nix-community/dream2nix

@therealpxc
Copy link

Would you (and anyone else following) be interested in a reboot of this project using the aforementioned dependency-verification abuse?

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.

@lorenzleutgeb
Copy link

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?

@unclechu
Copy link

For the record: at the current moment (December 2023) gradle2nix does not work with Gradle above 6. Current stable Gradle is 8.

@tadfisher
Copy link
Owner

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.

@mairs8
Copy link

mairs8 commented Feb 24, 2024

@tadfisher are you able to provide a status update on your v2?

@quentinmit
Copy link

For the record: at the current moment (December 2023) gradle2nix does not work with Gradle above 6. Current stable Gradle is 8.

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.

@CrazyChaoz
Copy link

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)

@irisjae
Copy link

irisjae commented Apr 13, 2024

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.

@tadfisher
Copy link
Owner

I have a v2 branch up for review here: #62

Please give this a try; it's much simpler and faster than the previous approach. I was able to run it against the jetbrains/kotlin repo and build kotlinc from source, and that project is as complex as they come.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests