diff options
Diffstat (limited to 'android')
| -rw-r--r-- | android/build.gradle | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/android/build.gradle b/android/build.gradle index 5fd0470c67..b01d3b1f98 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,3 +1,6 @@ +import org.jmailen.gradle.kotlinter.tasks.FormatTask +import org.jmailen.gradle.kotlinter.tasks.LintTask + apply plugin: 'com.android.application' apply plugin: 'kotlin-android' @@ -34,10 +37,29 @@ buildscript { repositories { jcenter() google() + + maven { + url = uri("https://plugins.gradle.org/m2/") + } } dependencies { classpath 'com.android.tools.build:gradle:3.2.0' classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71' + classpath 'org.jmailen.gradle:kotlinter-gradle:1.22.0' } } + +task lintKotlin(type: LintTask, group: 'verification') { + source files('src/main/kotlin') + reports = [ + 'plain': file('build/reports/kotlin-lint-report.txt'), + ] +} + +task format(type: FormatTask, group: 'formatting') { + source files('src/main/kotlin') + report file('build/reports/kotlin-format-report.txt') +} + +lint.dependsOn lintKotlin |
