Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.
This repository was archived by the owner on Nov 23, 2024. It is now read-only.

Move to latest Gradle API and best practices #323

@jjohannes

Description

@jjohannes

This is not a request but a proposal. @int128 if you would like to see this done, I will provide a PR with the changes. But since this is a larger change, I want to ask first.

Describe the feature

We are using this plugin in a project with Kotlin DSL and noticed that the plugin lacks behind in some of the latest Gradle features we would like to consistently use in our project:

  • Lazy configuration types for task inputs/outputs (e.g. DirectoryProvider instead of File)
  • TaskProvider<MyTask> instead of MyTask in API/DSL for task configuration avoidance
  • No Groovy specific types in public API (like Closure) to be Kotlin DSL friendly
  • @CompileStatic for Groovy code to be more performant at configuration times.

Why do you want the feature?

We would like to consistently use the features listed above in out build together with this plugin.

Notes:

  • If I do the change, I would attempt to not change the existing DSL for Groovy. E.g., even if we change from File to DirectoryProperty, you can still assign a File. You just also can assign lazy typed values - Provider<Directory> - as well.
  • Still, these will be 'API changes' and you might want to increase the major version of the plugin with this change.

Let me know if there are any concerns. If you would like to see this contributed, I would give it a try in a few days.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions