kotlinter-gradle: installKotlinterPrePushHook not working using 2.4.0

➜  escape_pod git:(update_ktlint) ./gradlew installKotlinterPrePushHook

FAILURE: Build failed with an exception.

* What went wrong:
Task 'installKotlinterPrePushHook' not found in root project 'escape_pod'.

* Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 4s

Let me know if you need more information

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 15 (7 by maintainers)

Commits related to this issue

Most upvoted comments

yep, i can see it now

Build Setup tasks
-----------------
init - Initializes a new Gradle build.
installKotlinterPrePushHook - Installs Kotlinter Git pre-push hook
wrapper - Generates Gradle wrapper files.

Actually, I have a thought: is apply plugin: "org.jmailen.kotlinter" and apply plugin: 'kotlin' present for the root project as well? That would cause the hook task to be missing. Quite understandable since the root project probably doesn’t have kotlin source code, although it would be harmless to include it.

  1. Yes
2020-06-14T20:46:30.067-0600 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.jmailen.kotlinter to root project 'escape_pod'' started
2020-06-14T20:46:30.068-0600 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Apply plugin org.jmailen.kotlinter to root project 'escape_pod''
2020-06-14T20:46:30.068-0600 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.jmailen.kotlinter to root project 'escape_pod'' completed
  1. we are using kotlin
  2. no installKotlinterPrePushHook is shown using ./gradlew -d tasks | grep "Register task"
➜  escape_pod git:(dev) gradle -d tasks | grep "Resolve kotlinter-gradle-2.4.0.jar"
2020-06-14T20:50:12.069-0600 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Resolve kotlinter-gradle-2.4.0.jar (org.jmailen.gradle:kotlinter-gradle:2.4.0)' completed
2020-06-14T20:50:12.066-0600 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Resolve kotlinter-gradle-2.4.0.jar (org.jmailen.gradle:kotlinter-gradle:2.4.0)' started
2020-06-14T20:50:12.069-0600 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Resolve kotlinter-gradle-2.4.0.jar (org.jmailen.gradle:kotlinter-gradle:2.4.0)'