Skip to content

Commit

Permalink
Upgrade to ktlint 0.29.0 and fix warnings on incremental build proper…
Browse files Browse the repository at this point in the history
…ties (#75)
  • Loading branch information
jeremymailen authored Oct 4, 2018
1 parent 8b9155a commit 48f45a3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Available on the Gradle Plugins Portal: https://plugins.gradle.org/plugin/org.jm
#### Single module
```groovy
plugins {
id 'org.jmailen.kotlinter' version '1.19.0'
id 'org.jmailen.kotlinter' version '1.20.0'
}
```

Expand All @@ -26,7 +26,7 @@ buildscript {
}
}
dependencies {
classpath 'org.jmailen.gradle:kotlinter-gradle:1.19.0'
classpath 'org.jmailen.gradle:kotlinter-gradle:1.20.0'
}
}
```
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id 'com.gradle.plugin-publish' version '0.10.0'
id 'java-gradle-plugin'
id 'maven-publish'
id 'org.jmailen.kotlinter' version '1.18.0'
id 'org.jmailen.kotlinter' version '1.19.0'
id 'idea'
}

Expand All @@ -13,7 +13,7 @@ repositories {
}

dependencies {
compile 'com.github.shyiko:ktlint:0.28.0'
compile 'com.github.shyiko:ktlint:0.29.0'
compile 'me.cassiano:ktlint-html-reporter:0.2.0'
compileOnly 'org.jetbrains.kotlin:kotlin-gradle-plugin'
compileOnly 'com.android.tools.build:gradle:3.0.1'
Expand All @@ -22,7 +22,7 @@ dependencies {
testRuntime 'com.android.tools.build:gradle:3.1.3'
}

version = '1.19.0'
version = '1.20.0'
group = 'org.jmailen.gradle'
def pluginId = 'org.jmailen.kotlinter'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.github.shyiko.ktlint.core.KtLint
import com.github.shyiko.ktlint.core.RuleSet
import org.gradle.api.logging.LogLevel
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.SourceTask
import org.gradle.api.tasks.TaskAction
import org.jmailen.gradle.kotlinter.KotlinterExtension
Expand All @@ -13,6 +14,7 @@ import java.io.File

open class FormatTask : SourceTask() {

@Internal
lateinit var report: File

@Input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import org.gradle.api.GradleException
import org.gradle.api.logging.LogLevel
import org.gradle.api.tasks.CacheableTask
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputFiles
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.OutputFiles
import org.gradle.api.tasks.PathSensitive
Expand All @@ -26,6 +27,10 @@ open class LintTask : SourceTask() {
@PathSensitive(PathSensitivity.RELATIVE)
lateinit var reports: Map<String, File>

@InputFiles
@PathSensitive(PathSensitivity.RELATIVE)
override fun getSource() = super.getSource()

@Input
var ignoreFailures = KotlinterExtension.DEFAULT_IGNORE_FAILURES

Expand Down

0 comments on commit 48f45a3

Please sign in to comment.