In the Kotlin 1.9.0 release, kapt tasks should now be additionally configured with the same custom configuration as KotlinCompile task.
Here protobuf plugin configures KotlinJvmCompile tasks with additional generated sources. Now it should also configure KaptGenerateStubs task with this additional sources. Even better approach would be to configure releated KotlinSourceSet similar to this workaround:
In the Kotlin 1.9.0 release, kapt tasks should now be additionally configured with the same custom configuration as
KotlinCompile
task. Here protobuf plugin configuresKotlinJvmCompile
tasks with additional generated sources. Now it should also configureKaptGenerateStubs
task with this additional sources. Even better approach would be to configure releatedKotlinSourceSet
similar to this workaround: