-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
128 lines (107 loc) · 3.76 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
127
128
import org.apache.tools.ant.filters.ReplaceTokens
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.2.0.RELEASE"
}
}
rootProject.version = "0.0.1"
group = "com.spaceshift"
allprojects {
apply plugin: "java"
apply plugin: "groovy"
apply plugin: "org.springframework.boot"
sourceCompatibility = JavaVersion.VERSION_14
targetCompatibility = JavaVersion.VERSION_14
repositories {
jcenter()
mavenCentral()
mavenLocal()
maven { url "https://dl.bintray.com/javasabr/maven" }
}
ext {
annotationVersion = "17.0.0"
rlibVersion = "9.9.0"
lombokVersion = '1.18.4'
springbootVersion = '2.2.0.RELEASE'
springVersion = '5.1.6.RELEASE'
junitJupiterVersion = "5.5.2"
testcontainersVersion = "1.12.1"
groovyVersion = "3.0.4"
spockVersion = "2.0-M3-groovy-3.0"
projectReactorVersion = "3.3.0.RELEASE"
byteBuddyVersion = "1.10.2"
objenesisVersion = "3.1"
gsonVersion = "2.8.6"
}
dependencies {
implementation "com.spaceshift:rlib.network:$rlibVersion"
implementation "com.spaceshift:rlib.logger.slf4j:$rlibVersion"
implementation "org.springframework.boot:spring-boot-starter:$springbootVersion"
implementation "org.springframework.boot:spring-boot-starter-log4j2:$springbootVersion"
implementation "io.projectreactor:reactor-core:$projectReactorVersion"
implementation "com.google.code.gson:gson:$gsonVersion"
compileOnly "org.jetbrains:annotations:$annotationVersion"
compileOnly "org.projectlombok:lombok:$lombokVersion"
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
// FIXME to remove
testCompile "com.hivemq:hivemq-mqtt-client:1.1.2"
testCompile "io.moquette:moquette-broker:0.12.1"
testCompileOnly "org.jetbrains:annotations:$annotationVersion"
testImplementation "org.springframework:spring-test:$springVersion"
testImplementation "org.spockframework:spock-core:$spockVersion"
testImplementation "org.spockframework:spock-spring:$spockVersion"
testImplementation "org.codehaus.groovy:groovy-all:$groovyVersion"
testImplementation "net.bytebuddy:byte-buddy-dep:$byteBuddyVersion"
testImplementation "org.objenesis:objenesis:$objenesisVersion"
}
sourceSets {
main {
java {
srcDirs 'src/main/groovy'
}
}
test {
java {
srcDirs 'src/test/groovy'
}
}
}
tasks.withType(Test) {
maxParallelForks = 2
forkEvery = 100
jvmArgs += "--enable-preview"
}
tasks.withType(JavaCompile) {
options.compilerArgs += "--enable-preview"
}
tasks.withType(GroovyCompile) {
options.forkOptions.jvmArgs += "--enable-preview"
}
processResources {
filter(ReplaceTokens, tokens: [
])
}
}
task buildSingleArtifact(type: GradleBuild) {
group = 'build'
description = 'Build all modules -> Build result artifact'
tasks = ['build', 'bootJar']
}
task buildSingleArtifactWithoutTests(type: GradleBuild) {
group = 'build'
description = 'Build all modules without tests -> Build result artifact'
tasks = ['classes', 'bootJar']
}
wrapper {
gradleVersion = '6.6-milestone-1'
distributionType = Wrapper.DistributionType.ALL
}
configurations.each {
it.exclude group: "org.slf4j", module: "slf4j-log4j12"
it.exclude group: "org.springframework.boot", module: "spring-boot-starter-logging"
}