-
Notifications
You must be signed in to change notification settings - Fork 275
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
Migrate ProtobufConvention to Gradle extensions #505
Labels
Comments
rougsig
added a commit
to rougsig/protobuf-gradle-plugin
that referenced
this issue
Jul 6, 2022
More details can be found here: google#505
rougsig
added a commit
to rougsig/protobuf-gradle-plugin
that referenced
this issue
Jul 6, 2022
More details can be found here: google#505
rougsig
added a commit
to rougsig/protobuf-gradle-plugin
that referenced
this issue
Jul 6, 2022
More details can be found here: google#505
ejona86
pushed a commit
that referenced
this issue
Jul 15, 2022
**Background** Gradle convention does not support dsl generation. [For automatic dsl generation gradle requires extensions](https://docs.gradle.org/current/userguide/implementing_gradle_plugins.html#extensions_vs_conventions). In that reason while we use convention, we need to write dsl accessors by hand (see [ProtobufConfiguratorExts.kt](https://github.com/google/protobuf-gradle-plugin/blob/master/src/main/kotlin/com/google/protobuf/gradle/ProtobufConfiguratorExts.kt)). **Changes** 1. Migrated from convention to extension. 2. Removed `Android/JavaGenerateProtoTaskCollection`. Now it one class named `GenerateProtoTaskCollection`. 3. Removed unnecessary kotlin dsl accessors, now it generated by gradle. **Breaking changes** 1. In reason `Changes.1`. Now `project.protobuf.protobuf` is not valid code. User should write `project.protobuf`. 2. In reason `Changes.3`. User should remove those imports from kotlin gradle scripts: . `com.google.protobuf.gradle.protobuf` . `com.google.protobuf.gradle.protoc` . `com.google.protobuf.gradle.plugins` . `com.google.protobuf.gradle.generateProtoTasks` . `com.google.protobuf.gradle.builtins` . `com.google.protobuf.gradle.ofSourceSet` . `com.google.protobuf.gradle.ofFlavor` . `com.google.protobuf.gradle.ofBuildType` . `com.google.protobuf.gradle.ofVariant` . `com.google.protobuf.gradle.ofNonTest` . `com.google.protobuf.gradle.ofTest` References issues: #505
Fixed by #577. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gradle deprecated conventions, this plugin still uses
ProtobufConvention
. Please migrate it to an extension.The text was updated successfully, but these errors were encountered: