-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
66 lines (55 loc) · 1.77 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
subprojects {
buildscript {
ext.kotlinVersion = '1.3.30'
repositories {
mavenCentral()
google()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.3.1'
}
}
repositories {
mavenCentral()
google()
jcenter()
}
group ARTIFACT_GROUP
version ARTIFACT_VERSION
apply plugin: 'checkstyle'
checkstyle {
toolVersion = '8.14'
configFile rootProject.file('checkstyle.xml')
showViolations true
configProperties = ['checkstyle.cache.file': rootProject.file('build/checkstyle.cache')]
}
task checkstyle(type: Checkstyle) {
source 'src'
include '**/*.java'
classpath = files()
}
def configureKtlint = {
project.configurations {
ktlint
}
project.dependencies {
ktlint 'com.github.shyiko:ktlint:0.31.0'
}
def ktlintCheck = project.tasks.create('ktlintCheck', JavaExec.class) {
main = 'com.github.shyiko.ktlint.Main'
classpath = project.configurations.ktlint
args 'src/**/*.kt'
}
project.check.dependsOn ktlintCheck
project.tasks.create('ktlintFormat', JavaExec.class) {
main = 'com.github.shyiko.ktlint.Main'
classpath = project.configurations.ktlint
args '-F', 'src/**/*.kt'
}
}
project.plugins.withId('kotlin', configureKtlint)
}