-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
109 lines (94 loc) · 2.7 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import org.gradle.api.tasks.wrapper.Wrapper.DistributionType
buildscript {
repositories {
jcenter()
}
dependencies {
classpath("com.github.ben-manes:gradle-versions-plugin:$gradleVersionsPluginVersion")
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
classpath("org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion")
}
}
// Apply build-scan before all other plugins
plugins {
id 'com.gradle.build-scan' version '2.1'
}
// Use "./gradlew dependencyUpdates -Drevision=release" to check dependencies
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'eclipse'
allprojects {
version = '0.0.1-SNAPSHOT'
repositories {
jcenter()
}
}
subprojects {
apply plugin: 'groovy'
apply plugin: 'kotlin'
apply plugin: 'io.spring.dependency-management'
// Java 8 bytecode
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileKotlin {
kotlinOptions.jvmTarget = '1.8'
}
compileTestKotlin {
kotlinOptions.jvmTarget = '1.8'
}
// Kotlin Linting
configurations {
ktlint
}
task ktlint(type: JavaExec) {
group = 'verification'
main = 'com.github.shyiko.ktlint.Main'
classpath = configurations.ktlint
args 'src/**/*.kt'
}
check.dependsOn ktlint
task ktlintFormat(type: JavaExec) {
group = 'verification'
main = 'com.github.shyiko.ktlint.Main'
classpath = configurations.ktlint
args '-F', 'src/**/*.kt'
}
dependencies {
ktlint 'com.github.shyiko:ktlint:0.30.0'
// Kotlin
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")
// Spock
testImplementation("org.codehaus.groovy:groovy-all:$groovyVersion")
testImplementation("org.spockframework:spock-core:$spockVersion")
testImplementation("cglib:cglib:$cglibVersion")
}
test {
testLogging {
exceptionFormat = 'full'
}
}
clean.doFirst {
delete "$projectDir/out/"
}
}
tasks.withType(AbstractArchiveTask) {
preserveFileTimestamps = false
reproducibleFileOrder = true
}
wrapper {
distributionType = DistributionType.ALL
gradleVersion = '5.2.1'
}
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
if (System.getenv('TRAVIS_PULL_REQUEST') == 'false') {
link 'VCS', "https://github.com/timrs2998/myretail/tree/${System.getProperty('vcs.branch')}"
}
if (System.getenv('CI')) {
publishAlways()
}
}