Comments (7)
Confirmed:
afterEvaluate {
check.dependsOn ktlintCheck
}
works fine now. Thanks for the workaround!
from ktlint-gradle.
In Gradle Kotlin DSL:
tasks.getByName("check").dependsOn(tasks.getByName("ktlintCheck"))
In groovy based gradle:
check.dependsOn ktlintCheck
from ktlint-gradle.
In Gradle Kotlin DSL:
tasks.getByName("check").dependsOn(tasks.getByName("ktlintCheck"))
Results in this error: Task with name 'ktlintCheck' not found in root project 'XYZ'.
In groovy based gradle:
check.dependsOn ktlintCheck
Results in the error in my original issue.
Again, ./gradlew ktlintCheck
on the same project works. Getting same results in Gradle 3.5 and 4.0.2.
from ktlint-gradle.
Sorry, try putting this in an afterEvaluate
block.
This is a bug and should be fixed. I think this may have been introduced in #12
@Tapchicoma can you take a look at this by chance?
from ktlint-gradle.
@JLLeitschuh sure, will take a look.
from ktlint-gradle.
@JLLeitschuh checked, my changes doesn't affect it.
I think ktlintCheck
never adds itself as a task that check
task depends on. But it worth to do it. Will open a PR for it.
from ktlint-gradle.
It would be nice if you could access the ktlintCheck
task without having to use an afterEvaluate
block too.
from ktlint-gradle.
Related Issues (20)
- Ktlint checks generated source since 12.1.0 HOT 6
- Task KtlintMainSourceSetCheck failed HOT 2
- Task :runKtlintCheckOverMainSourceSet FAILED HOT 3
- import checks HOT 1
- Caches work incorrectly: additionalEditorconfig should be @Input instead of @Internal HOT 3
- Filter to exclude a generated dir is not working in version 12.1.0 HOT 3
- ktlint pre-commit hook HOT 1
- Using ktlint-gradle with ktlint-intellij-plugin and baseline file
- Is there way to know which (maximum) ktlint versions are supported? HOT 2
- Version number in documentation
- deprecate old android flag
- unknown ktlint version HOT 2
- hxgc
- Deprecation warning with `ActionUpdateThread` HOT 1
- Upgrade ktlint-cli -> `VULNERALIBILTY` on logback-classic HOT 1
- How to use baseline when the project has multiple modules?
- Issue in init.gradle with ktlint-gradle when run script
- remove dependency on jcenter for tests
- standard_function-expression-body is not working
- ktlint-idea unsupport: Not Usable After Version 11.6.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ktlint-gradle.