google / protobuf-gradle-plugin

Protobuf Plugin for Gradle
Other
1.77k stars 273 forks source link

Configurable java executable #750

Closed wfhartford closed 8 months ago

wfhartford commented 8 months ago

This feature was discussed in #742. The change allows a user to specify the path to a Java executable in the ProtobufExtension or the GenerateProtoTask, or both, with the task overriding the extension. If the user does not specify any task, the existing behaviour (using the java running gradle) is unchanged.

Since gradle 6.7 there is a much cleaner solution using the configured Java toolchain (see https://docs.gradle.org/current/userguide/toolchains.html#sec:plugins), I did not investigate this option since the plugin currently supports gradle versions back to 5.6.

wfhartford commented 8 months ago

I think there is a problem with my test when run on Windows, I'm waiting for some feedback from a colleague, but will probably have to add another commit to this PR.

wfhartford commented 8 months ago

Is it true that most of the tests will not pass on windows? My colleague reported that a lot more tests failed than I expected.

ejona86 commented 8 months ago

I can't say the tests have ever been run on Windows. So, yeah, they could be pretty broken.

ejona86 commented 8 months ago

Thank you!

wfhartford commented 8 months ago

Thanks folks