-
Notifications
You must be signed in to change notification settings - Fork 276
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
Fix plugin compatibility with Kotlin Gradle Plugin 1.9.0 release #715
Merged
ejona86
merged 3 commits into
google:master
from
Tapchicoma:yahor/fix-kotlin-190-compatibility
Jul 10, 2023
Merged
Fix plugin compatibility with Kotlin Gradle Plugin 1.9.0 release #715
ejona86
merged 3 commits into
google:master
from
Tapchicoma:yahor/fix-kotlin-190-compatibility
Jul 10, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kotlin Gradle Plugin 1.9.0 release has changed how kapt tasks are configured: https://youtrack.jetbrains.com/issue/KT-54468/KAPT-Gradle-plugin-causes-eager-task-creation. Because of this change, generated proto sources are not passed to kaptGenerateStubs task leading to compilation error even in default setup. If the Kotlin plugin version is 1.7.20 - protobuf plugin now, instead of directly configuring KotlinCompile task inputs, configures related KotlinSourceSet. This way additional sources are passed both for KotlinCompile and KaptGenerateStubs tasks. Fixes issue google#714
ejona86
reviewed
Jul 7, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm glad source sets work now.
src/main/groovy/com/google/protobuf/gradle/ProtobufPlugin.groovy
Outdated
Show resolved
Hide resolved
Use .get() for generateProtoTask to map outputSourceDirectories into Kotlin compilation
ejona86
force-pushed
the
yahor/fix-kotlin-190-compatibility
branch
from
July 10, 2023 16:07
35e7641
to
a5192d2
Compare
ejona86
approved these changes
Jul 10, 2023
rougsig
approved these changes
Jul 10, 2023
YifeiZhuang
pushed a commit
to YifeiZhuang/protobuf-gradle-plugin
that referenced
this pull request
Jul 13, 2023
…gle#715) Kotlin Gradle Plugin 1.9.0 release has changed how kapt tasks are configured: https://youtrack.jetbrains.com/issue/KT-54468/KAPT-Gradle-plugin-causes-eager-task-creation. Because of this change, generated proto sources are not passed to kaptGenerateStubs task leading to compilation error even in default setup. If the Kotlin plugin version is 1.7.20 - protobuf plugin now, instead of directly configuring KotlinCompile task inputs, configures related KotlinSourceSet. This way additional sources are passed both for KotlinCompile and KaptGenerateStubs tasks. Fixes issue google#714
YifeiZhuang
added a commit
that referenced
this pull request
Jul 13, 2023
… (#721) Kotlin Gradle Plugin 1.9.0 release has changed how kapt tasks are configured: https://youtrack.jetbrains.com/issue/KT-54468/KAPT-Gradle-plugin-causes-eager-task-creation. Because of this change, generated proto sources are not passed to kaptGenerateStubs task leading to compilation error even in default setup. If the Kotlin plugin version is 1.7.20 - protobuf plugin now, instead of directly configuring KotlinCompile task inputs, configures related KotlinSourceSet. This way additional sources are passed both for KotlinCompile and KaptGenerateStubs tasks. Fixes issue #714 Co-authored-by: Yahor Berdnikau <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Kotlin Gradle Plugin 1.9.0 release has changed how kapt tasks are configured: https://youtrack.jetbrains.com/issue/KT-54468/KAPT-Gradle-plugin-causes-eager-task-creation. Because of this change, generated proto sources are not passed to kaptGenerateStubs task leading to compilation error even in default setup.
If the Kotlin plugin version is 1.7.20 - protobuf plugin now, instead of directly configuring KotlinCompile task inputs, configures related KotlinSourceSet. This way additional sources are passed both for KotlinCompile and KaptGenerateStubs tasks.
Fixes issue #714