question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not in `check` task

See original GitHub issue

My project has

apply plugin: 'kotlin'
apply plugin: "org.jlleitschuh.gradle.ktlint"

and ./gradlew ktlintCheck works fine.

But ./gradlew check does not run ktlint. I tried adding check.dependsOn ktlintCheck but this results in:

> Could not get unknown property 'ktlintCheck' for root project 'xyz' of type org.gradle.api.Project.

Is there any way to get this attached to the check task?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gladedcommented, Aug 3, 2017

Confirmed:

afterEvaluate {
    check.dependsOn ktlintCheck
}

works fine now. Thanks for the workaround!

0reactions
JLLeitschuhcommented, Aug 3, 2017

It would be nice if you could access the ktlintCheck task without having to use an afterEvaluate block too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to create an uncompletable task - Todoist
Simply access a task's Task view, click the name of the task to edit it, then add the * and space at the...
Read more >
How to check if a Task is running and restart if it is not running
I want to start the tasks and then check in a loop if they are still running, and to restart the task if...
Read more >
Validating tasks: check mode and diff mode
Check mode is just a simulation. It will not generate output for tasks that use conditionals based on registered variables (results of prior...
Read more >
Checking for existing planner tasks - if not create one
I am working on a flow that checks existing planner tasks. If one does not exist, then create one. Seems simple but I'm...
Read more >
Gradle check task essentials - Tom Gregory
Check is a task you run from the command line using . ... Gradle task dependencies and the task graph in Java projects,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found