This document discusses best practices for writing idiomatic Gradle plugins. Some key points include:
- Use methods over properties for flexibility and readability in the DSL.
- Support the same JDK range as Gradle for compatibility.
- Use annotations like @Input, @Output to define task attributes.
- Provide three methods (get, set, add) for collection attributes rather than using properties.
- Extend existing tasks through extensions rather than reimplementing them. Cache extension attributes.
- Generate code by configuring a Copy task as a generator and adding it to the correct source set.