Skip to content
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

Small Gradle plugin QoL improvements #3930

Merged
merged 4 commits into from
Feb 28, 2023

Conversation

ZacSweers
Copy link
Contributor

Just a few small things I thought I'd toss up for consideration

  • Add @SqlDelightDsl DSL marker. This prevents accidentally nesting multiple sqldelight DSL calls.
  • Use project.objects for initializing properties with conventions, allowing SqlDelightDatabase to avoid "accessing non-final property in constructor" warnings.
  • Use detachedConfiguration(), which is functionally achieving the same as before but a first-party API from gradle for accomplishing the same thing (i.e. plugin-internal configurations).

@ZacSweers
Copy link
Contributor Author

Removing the detachedConfiguration stuff because, to the surprise of no one, it works differently than expected and has no docs or plans to make it better.

@hfhbd
Copy link
Collaborator

hfhbd commented Feb 27, 2023

Does project.objects have any effect besides the (wrong) compiler message? I think this is just a style preference that I like more.
Regarding @SqlDelightDsl, interesting idea, never seen it before in Gradle plugins. This would only affect Kotlin DSL scripts, won't it?

@ZacSweers
Copy link
Contributor Author

ZacSweers commented Feb 27, 2023

What makes you say the compiler is wrong?

Re: the DSL, yes it would only work in kotlin build scripts

@dellisd dellisd merged commit 39bb99d into cashapp:master Feb 28, 2023
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.

None yet

3 participants