-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
126 lines (101 loc) · 3.31 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
plugins {
id "io.spring.dependency-management" version "1.0.11.RELEASE"
id "org.jetbrains.kotlin.jvm" version "1.5.21"
id "org.jetbrains.kotlin.plugin.spring" version "1.5.21"
id "org.jetbrains.kotlin.kapt" version "1.5.21"
id "org.gradle.maven-publish"
id "nu.studer.credentials" version "2.1"
}
group "com.auritylab"
version "0.1.19"
sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
jcenter()
}
ext {
set("springCloudVersion", "Hoxton.SR6")
}
configurations {
ktlint
}
dependencies {
// kotlin
implementation "org.jetbrains.kotlin:kotlin-reflect"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.12.4"
// spring
implementation "org.springframework:spring-core:5.3.9"
implementation "org.springframework:spring-web:5.3.9"
kapt "org.springframework.boot:spring-boot-configuration-processor:2.5.1"
// spring cloud
implementation "org.springframework.cloud:spring-cloud-gcp-starter"
// gcp
implementation "com.google.cloud:google-cloud-tasks"
// ktlint
ktlint("com.pinterest:ktlint:0.36.0")
// spring for tests
testImplementation "org.springframework:spring-test:5.3.8"
// tomcat for tests
testImplementation "javax.annotation:javax.annotation-api:1.3.2"
testImplementation("org.apache.tomcat.embed:tomcat-embed-core:10.0.8") {
exclude group: "tomcat-annotations-api", module: "org.apache.tomcat"
}
testImplementation "org.apache.tomcat.embed:tomcat-embed-el:10.0.8"
testImplementation "org.apache.tomcat.embed:tomcat-embed-websocket:10.0.8"
// JUnit
testImplementation "org.junit.jupiter:junit-jupiter-api:5.7.2"
testImplementation "org.junit.jupiter:junit-jupiter-engine:5.7.2"
// Mockito
testImplementation "org.mockito:mockito-core:3.4.6"
// Gson
testImplementation "com.google.code.gson:gson:2.8.7"
}
compileKotlin.dependsOn(processResources)
compileJava.dependsOn(processResources)
dependencyManagement {
imports {
mavenBom("org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}")
}
}
publishing {
repositories {
maven {
url "https://maven.pkg.github.com/AurityLab/spring-gcp-tasks"
credentials {
username project.credentials.getProperty("auritylab.github.username").toString()
password project.credentials.getProperty("auritylab.github.password").toString()
}
}
}
publications {
maven(MavenPublication) {
from components.java
}
}
}
test {
useJUnitPlatform()
dependsOn "cleanTest"
testLogging {
events "passed", "skipped", "failed"
}
}
task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
classpath = configurations.ktlint
main = "com.pinterest.ktlint.Main"
args "src/**/*.kt"
}
check.dependsOn ktlint
test.dependsOn ktlint
compileKotlin {
kotlinOptions.freeCompilerArgs = Collections.singletonList("-Xjsr305=strict")
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.freeCompilerArgs = Collections.singletonList("-Xjsr305=strict")
kotlinOptions.jvmTarget = "1.8"
}
wrapper {
distributionType = Wrapper.DistributionType.ALL
}