Skip to content

Commit

Permalink
Fix #76 formatKotlin failing when report directory does not exist (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremymailen committed Oct 12, 2018
1 parent 48f45a3 commit e150376
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
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.20.0'
id 'org.jmailen.kotlinter' version '1.20.1'
}
```

Expand All @@ -26,7 +26,7 @@ buildscript {
}
}
dependencies {
classpath 'org.jmailen.gradle:kotlinter-gradle:1.20.0'
classpath 'org.jmailen.gradle:kotlinter-gradle:1.20.1'
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
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.19.0'
id 'org.jmailen.kotlinter' version '1.20.0'
id 'idea'
}

Expand All @@ -22,7 +22,7 @@ dependencies {
testRuntime 'com.android.tools.build:gradle:3.1.3'
}

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

Expand Down
Expand Up @@ -4,7 +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.OutputFile
import org.gradle.api.tasks.SourceTask
import org.gradle.api.tasks.TaskAction
import org.jmailen.gradle.kotlinter.KotlinterExtension
Expand All @@ -14,7 +14,7 @@ import java.io.File

open class FormatTask : SourceTask() {

@Internal
@OutputFile
lateinit var report: File

@Input
Expand All @@ -23,6 +23,10 @@ open class FormatTask : SourceTask() {
@Input
var continuationIndentSize = KotlinterExtension.DEFAULT_CONTINUATION_INDENT_SIZE

init {
outputs.upToDateWhen { false }
}

@TaskAction
fun run() {
var fixes = ""
Expand Down

0 comments on commit e150376

Please sign in to comment.