forked from pinterest/ktlint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
75 lines (66 loc) · 2.17 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
67
68
69
70
71
72
73
74
75
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.31' apply false
id 'com.vanniktech.maven.publish' version '0.8.0' apply false
}
ext.versions = [
'kotlin': '1.3.31',
'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',
'aether' : [
'api' : "org.eclipse.aether:aether-api:${versions.aether}",
'spi' : "org.eclipse.aether:aether-spi:${versions.aether}",
'util' : "org.eclipse.aether:aether-util:${versions.aether}",
'impl' : "org.eclipse.aether:aether-impl:${versions.aether}",
'connector': [
'basic': "org.eclipse.aether:aether-connector-basic:${versions.aether}",
],
'transport': [
'file': "org.eclipse.aether:aether-transport-file:${versions.aether}",
'http': "org.eclipse.aether:aether-transport-http:${versions.aether}",
]
],
// Required by aether
'guava' : 'com.google.guava:guava:18.0',
// Used to silence aether-transport-http
'slf4j' : 'org.slf4j:slf4j-nop:1.6.2',
'aetherProvider': 'org.apache.maven:maven-aether-provider:3.2.5',
'picocli' : 'info.picocli:picocli:3.9.6',
// Testing libraries
'junit' : 'junit:junit:4.12',
'assertj' : 'org.assertj:assertj-core:3.9.0',
'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'
}
}
}