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

Migrate to Gradle's "official" support for custom compilers #13

Open
TheMrMilchmann opened this issue May 17, 2023 · 5 comments
Open

Migrate to Gradle's "official" support for custom compilers #13

TheMrMilchmann opened this issue May 17, 2023 · 5 comments
Assignees
Labels
a:feature New feature or request
Milestone

Comments

@TheMrMilchmann
Copy link
Owner

TheMrMilchmann commented May 17, 2023

While it remains to be seen if this ends up being merged, gradle/gradle#24649 looks like a promising solution for custom compiler jars. It makes sense to test against this change to check if everything works as intended. Using a custom Gradle build should hopefully not be too tricky but might require some more work.

If this test succeeds and when the change is merged, I should finally be able to release a stable version of this plugin. 🥳

@TheMrMilchmann TheMrMilchmann added the a:feature New feature or request label May 17, 2023
@TheMrMilchmann TheMrMilchmann added this to the 1.0.0 milestone May 17, 2023
@TheMrMilchmann TheMrMilchmann self-assigned this May 17, 2023
@jjohannes
Copy link

@TheMrMilchmann there is intention on the Gradle side to get the PR integrated. I'll address the comments there soon.

In the meantime, I would appreciate your feedback to see if this also solves the general case, before it gets released. I was mostly testing it with one real project and a toy project.

For obscure reasons 😄, I pushed a patched Gradle with the PR integrated here. Feel free to use that for testing (it's a full distribution in that folder):
https://github.com/jjohannes/gradle/tree/configurable-compiler-jar-bin/gradle-bin

@TheMrMilchmann
Copy link
Owner Author

Thanks, @jjohannes! In my opinion, this is looking really good. My only concern with this approach is that it might restrict the JVM used to run the build to be compatible with the custom compiler. However, I'm not entirely sure that's the case. I'll look into this in detail and run some tests ASAP although probably not before tomorrow evening.

@jjohannes
Copy link

that it might restrict the JVM used to run the build to be compatible with the custom compiler.

It should pick the java runtime from the configured toolchain to run the "Compile Worker Processes". So you should be able to pick whatever JVM you need through the toolchain facilities. But maybe it is not that simple. The code is very complex in that area. It would be great if you can double check such things especially if you have scenarios in mind to test this with. (No hurry though, the earliest this would be released in is Gradle 8.3 and 8.2 isn't out yet.)

@TheMrMilchmann
Copy link
Owner Author

Note: Unfortunately, it looks like this didn't make the cut for 8.3.

@TheMrMilchmann
Copy link
Owner Author

TheMrMilchmann commented Jan 23, 2024

Unfortunately, gradle/gradle#24649 was dropped, and it seems like it might be a while before any official support is made available.

However, the plugin is quite stable, so there is no urgency for me at the moment. I will reconsider creating an 1.0.0 release regardless later this year to aid in communicating this to potential users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants