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

Simple property assignments in KTS #2123

Merged
merged 3 commits into from
Oct 5, 2023

Conversation

Goooler
Copy link
Contributor

@Goooler Goooler commented Jul 11, 2023

Description

Follow up #2105.

https://blog.gradle.org/simpler-kotlin-dsl-property-assignment

Checklist

Before submitting the PR, please check following (checks which are not relevant may be ignored):

  • Commit message are well written. In addition to a short title, the commit message also explain why a change is made.
  • At least one commit message contains a reference Closes #<xxx> or Fixes #<xxx> (replace<xxx> with issue number)
  • Tests are added
  • KtLint format has been applied on source code itself and violations are fixed
  • CHANGELOG.md is updated
  • PR description added

Documentation is updated. See difference between snapshot and release documentation

@paul-dingemans
Copy link
Collaborator

https://blog.gradle.org/simpler-kotlin-dsl-property-assignment

states:

It’s important to note that the feature is still marked as incubating. Changes to the feature are possible, although unlikely. We don’t recommend using this feature in published plugins until it’s marked as stable (likely in Gradle 8.3).

Lazy property assignment is supported in IntelliJ 2022.3 (2023.1.1 or newer is recommended) and Android Studio Giraffe (or newer).

I have some doubts whether we already should try this out in our build or that we should wait until the stable release. Is there a pressing need, not to wait?

@Goooler
Copy link
Contributor Author

Goooler commented Jul 12, 2023

Either way, I also filed it to detekt/detekt#6251.

@paul-dingemans paul-dingemans marked this pull request as draft July 12, 2023 09:49
@paul-dingemans
Copy link
Collaborator

Marked as draft until Gradle 8.3 is released.

@paul-dingemans
Copy link
Collaborator

In Gradle 8.3, this feature is still marked as unstable.

@Goooler
Copy link
Contributor Author

Goooler commented Aug 22, 2023

Yeah.

# Conflicts:
#	build-logic/src/main/kotlin/ktlint-kotlin-common.gradle.kts
@Goooler
Copy link
Contributor Author

Goooler commented Sep 6, 2023

Some of this feature had been used in

javaLauncher = javaToolchains.launcherFor { languageVersion = JavaLanguageVersion.of(version) }

Maybe it's time to land this.

@Goooler Goooler marked this pull request as ready for review September 6, 2023 04:40
@Goooler
Copy link
Contributor Author

Goooler commented Oct 5, 2023

It's stable after #2294 merged.

@paul-dingemans paul-dingemans merged commit ea8df7e into pinterest:master Oct 5, 2023
11 checks passed
@Goooler Goooler deleted the kts_assign branch October 5, 2023 07:38
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