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

Gradle Plugin: update custom Gradle utils to use Gradle Kotlin DSL #2833

Merged

Conversation

aSemy
Copy link
Contributor

@aSemy aSemy commented Jan 29, 2023

Part of #2700

This PR removes some of the custom Gradle utility functions that are now provided by the Gradle Kotlin DSL.

  • getSafe() ➡️ get(), or orNull
  • safeProperty() ➡️ org.gradle.kotlin.dsl.property()
  • safeConvention() ➡️ convention()

The benefit is closer alignment with the Gradle API, and more idiomatic code that helps with working with the Gradle plugin, as the code can be understood without needing to know about the custom utilities specific to Dokka.

This PR is similar to #2706.

Depends on

@aSemy aSemy changed the title Feat/update gradle utils with kotlin dsl Gradle Plugin: update custom Gradle utils to use Gradle Kotlin DSL Jan 29, 2023
@IgnatBeresnev IgnatBeresnev self-requested a review January 30, 2023 18:53
@IgnatBeresnev IgnatBeresnev added the runner: Gradle plugin An issue/PR related to Dokka's Gradle plugin label Jan 31, 2023
@aSemy aSemy force-pushed the feat/update_gradle_utils_with_kotlin_dsl branch from 47010c2 to 42c6cc4 Compare February 22, 2023 11:05
Copy link
Member

@IgnatBeresnev IgnatBeresnev left a comment

Choose a reason for hiding this comment

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

TIL, thanks :) I've triggered the lengthy integration tests just in case, will merge the PR once they pass

@IgnatBeresnev IgnatBeresnev merged commit 8d23340 into Kotlin:master Feb 23, 2023
@aSemy aSemy deleted the feat/update_gradle_utils_with_kotlin_dsl branch February 23, 2023 16:58
Copy link
Contributor

@Goooler Goooler left a comment

Choose a reason for hiding this comment

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

🚀 LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
runner: Gradle plugin An issue/PR related to Dokka's Gradle plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants