Comments (11)
Try also applying the plugin in the allprojects
block.
from ktlint-gradle.
@GianfrancoMS I can't find
ktlint-gradle
configuration in your develop branchbuild.gradle
.Note, that to use this plugin with android plugin, you should use
classpath
approach, notplugins {}
config block.
Why is this? Is this still an issue?
from ktlint-gradle.
Are the tasks marked "UP-TO-DATE" thus not executing the format task or are they being run?
from ktlint-gradle.
This is the output for ktlintCheck:
8:37:06 AM: Executing task 'ktlintCheck'...
Executing tasks: [ktlintCheck]
Configuration on demand is an incubating feature.
> Task :app:ktlintDebugAndroidTestCheck NO-SOURCE
> Task :app:ktlintDebugCheck
> Task :app:ktlintDebugUnitTestCheck NO-SOURCE
> Task :app:ktlintReleaseCheck
> Task :app:ktlintReleaseUnitTestCheck NO-SOURCE
> Task :app:ktlintCheck
BUILD SUCCESSFUL in 2s
2 actionable tasks: 2 executed
8:37:09 AM: Task execution finished 'ktlintCheck'.
from ktlint-gradle.
And this the output for ktlintFormat:
8:35:56 AM: Executing task 'ktlintFormat'...
Executing tasks: [ktlintFormat]
Configuration on demand is an incubating feature.
> Task :app:ktlintDebugAndroidTestFormat
> Task :app:ktlintDebugFormat
> Task :app:ktlintDebugUnitTestFormat
> Task :app:ktlintReleaseFormat
> Task :app:ktlintReleaseUnitTestFormat
> Task :app:ktlintFormat
BUILD SUCCESSFUL in 7s
5 actionable tasks: 5 executed
8:36:04 AM: Task execution finished 'ktlintFormat'.
from ktlint-gradle.
Can you provide your build.gradle.kts
scripts?
from ktlint-gradle.
I'm not using the Gradle Kotlin DSL, just plain old Groovy.
The build.gradle can be found here
from ktlint-gradle.
I added these lines to my module's build.gradle and ktlintCheck is working now:
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
main.java.srcDirs += [file("$buildDir/generated/source/kapt/main")]
test.java.srcDirs += 'src/test/kotlin'
androidTest.java.srcDirs += 'src/androidTest/kotlin'
}
But ktlintFormat is still not working. Any ideas?
from ktlint-gradle.
@GianfrancoMS I can't find ktlint-gradle
configuration in your develop branch build.gradle
.
Note, that to use this plugin with android plugin, you should use classpath
approach, not plugins {}
config block.
from ktlint-gradle.
@Tapchicoma I removed it. I ended up using just ktlint.
from ktlint-gradle.
@GianfrancoMS can you either try to apply this plugin via classpath
and report back or just close this issue?
from ktlint-gradle.
Related Issues (20)
- Failing Builds Automatically HOT 1
- Same Issue HOT 6
- Cannot apply to buildSrc HOT 4
- Using this plugin with the official IntelliJ IDE plugin HOT 3
- K2 issue: A failure occurred while executing worker.KtLintWorkAction FILE HOT 2
- 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
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.