You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use NamedDomainObjectContainer<T>.invoke(Action) instead. Otherwise the plugin triggers deprecation warnings on Gradle 7 and will fail on Gradle 8. The problematic call is here.
The text was updated successfully, but these errors were encountered:
Duplicate of #444. We aren't able to migrate to the new API unless Gradle publishes artifacts of org.gradle:gradle-kotlin-dsl containing the API. See gradle/gradle#16884.
Plugins shouldn't be calling these methods at all, they are added to domain objects automatically by Gradle. ProtobufConfigurator/GenerateProtoTask should have Action-taking methods rather than Closure-taking methods. Gradle will automatically generate what Groovy and Kotlin need by runtime-subclassing ProtobufConfigurator. This works for project extensions, tasks and any other object created through project.objects.newInstance.
Also, you should remove ProtobufConvention. Instead, add the ProtobufConfigurator via project.extensions.create("protobuf", ProtobufConfigurator).
Finally, you should only use gradleApi, not depend on gradle-kotlin-dsl, which was never intended for consumption by plugins. It was an internal detail that the Kotlin DSL used to be in a different repository. It is now part of the Gradle monorepo, which is why it is no longer published.
Use
NamedDomainObjectContainer<T>.invoke(Action)
instead. Otherwise the plugin triggers deprecation warnings on Gradle 7 and will fail on Gradle 8. The problematic call is here.The text was updated successfully, but these errors were encountered: