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

"Understanding tasks" docs page problems #29863

Closed
acmpo6ou opened this issue Jul 9, 2024 · 2 comments · Fixed by #29990
Closed

"Understanding tasks" docs page problems #29863

acmpo6ou opened this issue Jul 9, 2024 · 2 comments · Fixed by #29990
Assignees
Labels
a:documentation Documentation content in:writing-tasks task option
Milestone

Comments

@acmpo6ou
Copy link

acmpo6ou commented Jul 9, 2024

Issue type

Wrong or misleading information

Problem description

The Understanding tasks page in the docs has some problems.

The explanation is good, but there are some problems on the page.

The "3. Implementing tasks" section has a link at the end "You can learn more about developing custom task types in Implementing Tasks.", this link just goes to section "3. Implementing tasks". So the "3. Implementing tasks" section is referring to itself, which is super confusing, and I don't know what the intention was there.

The code examples in the "3. Implementing tasks" section are wrong for Kotlin and Groovy. They should be the other way around. The Kotlin example uses "extend" keyword that doesn't exist in Kotlin, and Groovy example uses Kotlin syntax.

Here is what the page has in the Kotlin example:

abstract class MyCopyTask extends DefaultTask {

}

as you can see, this is not even Kotlin code. The Groovy example has the Kotlin code:

abstract class MyCopyTask : DefaultTask() {

}

Context (optional)

No response

Page with the problem

https://docs.gradle.org/current/userguide/more_about_tasks.html#sec:implementing_tasks

@acmpo6ou acmpo6ou added a:documentation Documentation content to-triage labels Jul 9, 2024
@ljacomet ljacomet added in:writing-tasks task option and removed to-triage labels Jul 10, 2024
@ljacomet
Copy link
Member

This is a valid documentation issue.


@lkasso We should really move all the snippets in those pages to testable ones, so that such issues with invalid code are not even possible.

@lkasso lkasso self-assigned this Jul 19, 2024
@lkasso
Copy link
Member

lkasso commented Jul 22, 2024

Looks like the Groovy and Kotlin examples are reversed in some pages. I am going through the chapter and fixing them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:documentation Documentation content in:writing-tasks task option
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants