-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Gradle build: Upgrade protobuf Gradle plugin (for Gradle 8, Java 20) #3059
Gradle build: Upgrade protobuf Gradle plugin (for Gradle 8, Java 20) #3059
Conversation
Can we keep the version upgrade separate from the rest? There were good reasons against generating the protobufs on the fly, if I only could remember. |
I think so. Let's merge #3058 and then I'll try breaking this one down to the minimum functionality to get Gradle 8 working.
Something seemed to break when I upgraded either protobuf itself or the plugin (I started getting duplicate Proto.java files) -- so I just deleted the build.gradle line that set the directory and that seemed to resolve the issue. I can investigate further... |
6e85ea3 says "too much support hassle." Does that ring a bell? |
I picked one of the version upgrades. |
I've updated the plugin to
|
Apparently not. It looks like the Gradle Plug-in has dropped support for specifying the (complete) output directory. (and without the courtesy of giving an error when the removed option is used) |
|
So to clarify: there is no way with 0.8.2 to keep the existing behaviour to generate the protobuf files within If that is true, is there a way to use a new special directory, which is not part of And also, what are the downsides of staying with 0.8.1 for as long as this issue is resolved by the plugin (which I assume should be resolved; our configuration used to be very common years ago)? |
I don't know if there is no way. I have very little knowledge of protobuf and the protobuf Gradle plugin. I only tinker with it when I'm trying to upgrade Gradle. I also assume you mean 0.9.2 above, right? |
Yes, sorry. |
adcb5de
to
dedd20e
Compare
Rebased and force-pushed. (This still combines upgrading the plugin, removing the generated files from Git, and removing the deprecated |
In 0.9.2 the plugin will always use the default directory. But if you specify generatedFilesBaseDir, then it will copy the generated files into that directory afterward. generatedFilesBaseDir is deprecated because it doesn't handle deletes properly, because it can't distinguish between "old generated code" and "your artisan source files." |
dedd20e
to
703e06b
Compare
I think we could make it a "source set" in Gradle and put it in |
@schildbach I have rebased and force-pushed. I think we should merge #3101 to move the generated Java classes to Given that you don't remember the "good reason" for checking in the generated source, and that I recall you saying elsewhere that you "weren't opposed" to removing it, I think we should go ahead and remove it. If we find a problem we can revert the change or try a different approach (maybe a source-set) |
@ejona86 I forgot to thank you for your comment until now. Thank you! |
…d Protos files * Upgrade Gradle protobuf plugin to version 0.9.4 (if Gradle 7 or later) * Remove deprecated `generatedBaseFileDir` setting, default to build/generated/...
703e06b
to
1d245bb
Compare
@schildbach OK, this is rebased to upgrade to the latest Protobuf plugin and to remove the deprecated |
Merged. |
Upgrade protobuf-javalite to version 3.22.3