google / protobuf-gradle-plugin

Protobuf Plugin for Gradle
Other
1.73k stars 269 forks source link

Plugin is not compatible with changes in Kotlin Gradle plugins 1.9.0 release #714

Closed Tapchicoma closed 11 months ago

Tapchicoma commented 12 months ago

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:

androidComponents.beforeVariants {
    android.sourceSets.register(it.name) {
        java.srcDir(buildDir.resolve("generated/source/proto/${it.name}/java"))
        kotlin.srcDir(buildDir.resolve("generated/source/proto/${it.name}/kotlin"))
    }
}
ejona86 commented 11 months ago

Fixed by #715