Skip to content

Commit f235aa0

Browse files
committed
Adds spotless plugin
Change-Id: I68870bf114a91775af8ff5ad6e420953f3eb1c9c
1 parent 94e7656 commit f235aa0

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

build.gradle

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
buildscript {
2-
ext.kotlinVersion = '1.3.31'
2+
ext.kotlinVersion = '1.3.50'
33
ext.navigationVersion = "2.1.0-alpha06"
4+
ext.ktlintVersion = '0.33.0'
45
repositories {
56
google()
67
jcenter()
78
}
89
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.4.1'
10+
classpath 'com.android.tools.build:gradle:3.5.2'
1011
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
1112
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigationVersion"
1213

@@ -15,15 +16,23 @@ buildscript {
1516
}
1617
}
1718

19+
plugins {
20+
id "com.diffplug.gradle.spotless" version "3.24.0"
21+
}
22+
1823
allprojects {
1924
repositories {
2025
google()
2126
jcenter()
2227
}
23-
}
24-
25-
task clean(type: Delete) {
26-
delete rootProject.buildDir
28+
apply plugin: 'com.diffplug.gradle.spotless'
29+
spotless {
30+
kotlin {
31+
target "**/*.kt"
32+
targetExclude ".idea/"
33+
ktlint(ktlintVersion)
34+
}
35+
}
2736
}
2837

2938
// Define versions in a single place

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

0 commit comments

Comments
 (0)