-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
73 lines (59 loc) · 2.01 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
buildscript {
ext.kotlinLoggingVersion = '1.6.24'
ext.logbackVersion = '1.2.3'
ext.junitVersion = '5.3.2'
ext.mockitoKotlinVersion = '1.6.0'
repositories { mavenCentral() }
}
plugins {
id "org.jetbrains.kotlin.jvm" version "1.3.21"
id "com.diffplug.gradle.spotless" version "3.16.0"
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
allprojects {
apply plugin: 'java'
apply plugin: 'kotlin'
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8",
"io.github.microutils:kotlin-logging:$kotlinLoggingVersion",
"ch.qos.logback:logback-classic:$logbackVersion"
testCompile "org.junit.jupiter:junit-jupiter-engine:$junitVersion",
"com.nhaarman:mockito-kotlin:$mockitoKotlinVersion"
}
compileKotlin { kotlinOptions.jvmTarget = "1.8" }
compileTestKotlin { kotlinOptions.jvmTarget = "1.8" }
apply plugin: 'com.diffplug.gradle.spotless'
// see https://github.com/diffplug/spotless/tree/master/plugin-gradle
spotless {
kotlin {
// This path needs to be relative to each project
target fileTree('.') {
include '**/*.kt'
exclude '**/.gradle/**'
}
// see https://github.com/shyiko/ktlint#standard-rules
ktlint().userData(['max_line_length': '100', 'insert_final_newline': 'true'])
licenseHeaderFile "${rootDir}/gradle/spotless.kotlin.license" // License header file
}
groovyGradle {
target '*.gradle'
greclipse().configFile(rootProject.file('gradle/formatter.properties'))
endWithNewline()
paddedCell() // recommended hack to keep gradle files tidy
}
}
}