Skip to content

Commit

Permalink
Fixed gradle integration instructions (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
shyiko committed Jul 28, 2016
1 parent c5d423d commit ad8980b
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,26 +108,29 @@ To run formatter - `mvn antrun:run@ktlint-format`.
#### ... with [Gradle]()

```groovy
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.github.shyiko:ktlint:0.1.0'
}
repositories {
mavenCentral()
}
configurations {
ktlint
}
dependencies {
ktlint 'com.github.shyiko:ktlint:0.1.0'
}
task ktlint(type:JavaExec) {
main = "com.github.shyiko.ktlint.Main"
classpath = buildscript.configurations.classpath
classpath = configurations.ktlint
args "src/**/*.kt"
}
check.dependsOn ktlint
task ktlintFormat(type:JavaExec) {
main = "com.github.shyiko.ktlint.Main"
classpath = buildscript.configurations.classpath
classpath = configurations.ktlint
args "-F", "src/**/*.kt"
}
```
Expand Down

0 comments on commit ad8980b

Please sign in to comment.