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

KAFKA-18358: Replace Deprecated $buildDir variable in build.gradle #18343

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

m1a2st
Copy link
Contributor

@m1a2st m1a2st commented Dec 29, 2024

Jira: https://issues.apache.org/jira/browse/KAFKA-18358

We should replace $buildDir to ${layout.buildDirectory.get().asFile}, because $buildDir is deprecated. see the gradle document

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@github-actions github-actions bot added triage PRs from the community build Gradle build or GitHub Actions small Small PRs labels Dec 29, 2024
build.gradle Outdated
@@ -1459,7 +1459,7 @@ project(':group-coordinator:group-coordinator-api') {
}

task createVersionFile() {
def receiptFile = file("$buildDir/kafka/$buildVersionFileName")
def receiptFile = file("${layout.buildDirectory.get().asFile}/kafka/$buildVersionFileName")
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need the path here instead since we want to use a string and not the java.io.File object?

Perhaps, layout.buildDirectory.get().asFile.path

(similar comment for other places)

@github-actions github-actions bot removed the triage PRs from the community label Jan 3, 2025
@m1a2st
Copy link
Contributor Author

m1a2st commented Jan 3, 2025

Thanks for @divijvaidya comment, addressed it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Gradle build or GitHub Actions small Small PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants