google / protobuf-gradle-plugin

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

Task generateProto is not executed during build in version 0.9.3 #701

Closed TorbenSp09 closed 1 year ago

TorbenSp09 commented 1 year ago

Hey, i have a gradle-project using JDK v16.0.1. I just wanted to update the version of the protobuf plugin from v0.8.18 to v0.9.3. Added to that, i am using v3.22.2 of the protobuf compiler. I have two .proto files that i need in my project. Since i updated from v0.8.18 -> v0.9.3 the generateProto task won't be executed during build. This causes some errors in my CI/CD pipeline and i don't know why this happens. These were the steps executed using v0.8.18: image

However, these are the steps executed after updating to v0.9.3: image

As shown, the kotlinCompiler fails because the dependencies that are created by generateProto are missing now. I have already tried several things, including manually setting the source set of the .proto files, but nothing has worked. I have also taken a look into the release notes but there i can't see anything that will cause this. I know that it is possible to add the generateProto task to the build task but i think this is not the right way to go is it?

Thank you!

ejona86 commented 1 year ago

The protobuf compiler version probably doesn't matter.

"Added generated code to java SourceSet" and "Substantial internal modernization" from 0.9.0 are the parts from the release notes probably related to this. Previously the plugin had explicit code for Kotlin that modified the compileKotlin task. Now the sources are added to the sourceSet and picked up automatically.

We have tests for Kotlin code, and other Kotlin users seem to have been working, so the question is "what is special about your build?" A reproduction is most helpful. Without even build snippets, there's nothing for us to go on.

ejona86 commented 1 year ago

No response to provide more information, so closing. More information can be provided and then we can reopen.