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

Support mill init from existing Gradle project (1500USD Bounty) #3962

Open
lihaoyi opened this issue Nov 14, 2024 · 6 comments · May be fixed by #4363
Open

Support mill init from existing Gradle project (1500USD Bounty) #3962

lihaoyi opened this issue Nov 14, 2024 · 6 comments · May be fixed by #4363
Labels

Comments

@lihaoyi
Copy link
Member

lihaoyi commented Nov 14, 2024


From the maintainer Li Haoyi: I'm putting a 1500USD bounty on this issue, payable by bank transfer on a merged PR implementing this.


Same as #3449 and #3450 but for Gradle instead of Maven and SBT.

@lihaoyi lihaoyi added the bounty label Nov 14, 2024
@lihaoyi
Copy link
Member Author

lihaoyi commented Nov 14, 2024

CC @ajaychandran in case you're interested, since you're already familiar with all the code and much of it can be shared

@lihaoyi lihaoyi changed the title Support mill init from existing Gradle project (1000USD Bounty) Support mill init from existing Gradle project (1500USD Bounty) Dec 2, 2024
@lihaoyi
Copy link
Member Author

lihaoyi commented Dec 2, 2024

Bumping the bounty from 1000->1500USD

ShreckYe added a commit to ShreckYe/mill that referenced this issue Jan 18, 2025
…ting Gradle project (com-lihaoyi#3962) referencing com-lihaoyi#3756

- Add an `InitFromGradleModule` object and the trait with the same name, with common logic extracted from the `InitMavenModule` trait into the `InitFromAnotherBuildToolModule` trait
- Add necessary dependencies and repository to use the Gradle Tooling API
- Add lines in `MainModule.init` for Gradle adapted from those for Maven
- Copy and adapt `BuildGen` and `BuildGenConfig` for Gradle from the `maven` module
- Initially configure the `GradleConnector` and retrieve the `GradleBuild` with the Gradle Tooling API in `mill.main.gradle.BuildGen`
- extract and move common build generator logic into the `build-gen` module and the `buildgen` package

  A `CommonBuildGenConfig` is extracted for both Maven and Gradle. "ir.scala" and "Tree.scala" and moved here from the `maven` module.

  As the original `build` package name is somewhat too broad and its directory is ignored by .gitignore by default, I don't think it's a proper name to use here.
@ShreckYe
Copy link

ShreckYe commented Jan 18, 2025

This is a bit of a disappointment for me as I've also been working on this for a while and looks like @ajaychandran has beaten me to it 😅. Congratulations Ajay! I hadn't seen any updates here in a while, and mistakenly assumed no one is working on it. So lesson learned – I should have commented and asked. I've encountered some points during my own implementation, so I'd like to join the code review and share some suggestions if I may.

@lihaoyi
Copy link
Member Author

lihaoyi commented Jan 18, 2025

@ShreckYe please go ahead and join the code review!

@lihaoyi
Copy link
Member Author

lihaoyi commented Jan 18, 2025

@ShreckYe in fact I'll happily pay you 500USD, separate from the bounty, just to give a rigorous code review of @ajaychandran's PR given your experience wrestling with the problem in your own fork

@ShreckYe
Copy link

Thanks @lihaoyi. I will do it now.

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

Successfully merging a pull request may close this issue.

2 participants