forked from pinterest/ktlint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
58 lines (49 loc) · 1.41 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
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.41' apply false
id 'com.vanniktech.maven.publish' version '0.8.0' apply false
}
ext.versions = [
'kotlin': '1.3.50',
'aether': '1.1.0'
]
ext.deps = [
'kotlin' : [
'stdlib' : "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}",
'compiler': "org.jetbrains.kotlin:kotlin-compiler-embeddable:${versions.kotlin}"
],
'klob' : 'com.github.shyiko.klob:klob:0.2.1',
ec4j : 'org.ec4j.core:ec4j-core:0.2.0',
'picocli' : 'info.picocli:picocli:3.9.6',
// Testing libraries
'junit' : 'junit:junit:4.12',
'assertj' : 'org.assertj:assertj-core:3.12.2',
'jimfs' : 'com.google.jimfs:jimfs:1.1'
]
configurations {
ktlint
}
dependencies {
ktlint project(':ktlint')
}
task ktlint(type: JavaExec, group: LifecycleBasePlugin.VERIFICATION_GROUP) {
description = "Check Kotlin code style."
classpath = configurations.ktlint
main = 'com.pinterest.ktlint.Main'
args '*/src/**/*.kt'
}
allprojects {
repositories {
gradlePluginPortal()
}
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
kotlinOptions {
jvmTarget = '1.8'
}
}
}