Skip to content

Conversation

@hfhbd
Copy link
Contributor

@hfhbd hfhbd commented Jan 16, 2026

Instead of manually creating the Property via ObjectFactory, you should use an abstract member.

Also, Gradle prefers a safe interface, this will be enforced (with opt-out) via the upcoming Declarative DSL, but it is nice to enforce it as a best practice now too.

Safe means:

  • Implemented as an interface
  • Does not have a separate implementation type
  • Does not have injected services or contain nested injected services

gradle/gradle#35926 (comment)

Copy link
Owner

@drewhamilton drewhamilton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks. If there's no pressing need, I'll hold onto this until another breaking change has to be made. This will be for Kotlin 2.4.0 at latest.

@hfhbd
Copy link
Contributor Author

hfhbd commented Jan 16, 2026

There is no pressing need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants