This repository has been archived by the owner on Apr 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
executable file
·165 lines (144 loc) · 5.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
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
buildscript {
repositories {
mavenCentral()
maven {
url "http://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.0.1.RELEASE")
/*
* This configuration works. I can run 'gradle pitest' without problems. I also
* can run 'gradle bootRun' without problems.
*
* URL: http://localhost:8080/dashboard/index.html -> OK
* URL: http://localhost:8080/dashboard/api/greeting -> OK
*/
classpath("info.solidsoft.gradle.pitest:gradle-pitest-plugin:0.32.0") {
exclude group: "org.pitest"
}
classpath "org.pitest:pitest-command-line:0.33"
/*
* Commenting out lines 17-20 and using 0.33.0-SNAPSHOT of the plugin breaks the build
*
* - pitest tasks is working
* - I cannot start the application because the configuration file is no more picked up.
* - moving the application.properties to project root folder workarounds this,
* but logging config is missing
*
* URL: http://localhost:8080/dashboard/index.html -> NOT_FOUND
* URL: http://localhost:8080/dashboard/api/greeting -> STILL OK
*
* It turns out the the pitest SNAPSHOT plugin somehow scrambles the builds setup, the whole
* 'src/main/resources' folder seems to be ignored and no more recognised by spring-boot. So
* all static resources are missing within the deployment.
*
* I do not think this is an issue with the spring-boot-gradle-plugin (not sure though), as
* with gradle-pitest-plugin-0.32.0 everything is working fine.
*/
//classpath("info.solidsoft.gradle.pitest:gradle-pitest-plugin:0.33.0-SNAPSHOT")
}
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: "pitest"
apply plugin: 'spring-boot'
configurations {
all*.exclude(group: "commons-logging")
all*.exclude(group: "joda-time")
}
ext {
sourceCompatibility = 1.8
targetCompatibility = 1.8
assertjVersion = "1.5.0"
flywayGradleVersion = "2.3.1"
guavaVersion = "16.0.1"
hibernateVersion = "4.3.4.Final"
hibernateValidatorVersion = "5.1.0.Final"
hikariVersion = "1.3.5"
jacksonVersion = "2.3.1"
jettyVersion = "9.1.4.v20140401"
logbackVersion = "1.1.1"
mockitoVersion = "1.9.5"
mysqlVersion = "5.1.29"
pitestPluginVersion = "0.32.0"
queryDslVersion = "3.3.1"
slf4jVersion = "1.7.6"
springVersion = "4.0.3.RELEASE"
springBootVersion = "1.0.1.RELEASE"
springDataCommonsVersion = "1.7.1.RELEASE"
springDataJpaVersion = "1.5.2.RELEASE"
springSecurityVersion = "3.2.3.RELEASE"
testngVersion = "6.8.8"
validationVersion = "1.1.0.Final"
}
repositories {
mavenCentral()
}
dependencies {
// Spring Framework
compile "org.springframework:spring-aspects:" + springVersion
compile "org.springframework:spring-jdbc:" + springVersion
compile "org.springframework:spring-orm:" + springVersion
compile "org.springframework:spring-tx:" + springVersion
compile "org.springframework:spring-webmvc:" + springVersion
// Spring Security
compile("org.springframework.security:spring-security-web:" + springSecurityVersion) {
exclude group: "org.springframework"
}
compile("org.springframework.security:spring-security-config:" + springSecurityVersion) {
exclude group: "org.springframework"
}
// Spring boot
compile("org.springframework.boot:spring-boot-starter:" + springBootVersion) {
exclude module: "spring-boot-starter-logging"
}
compile("org.springframework.boot:spring-boot-starter-jetty:" + springBootVersion) {
exclude group: "org.eclipse.jetty"
}
// JSR-303
compile "javax.validation:validation-api:" + validationVersion
compile "org.hibernate:hibernate-validator:" + hibernateValidatorVersion
// Guava
compile "com.google.guava:guava:" + guavaVersion
// Jetty9
compile "org.eclipse.jetty:jetty-webapp:" + jettyVersion
compile "org.eclipse.jetty:jetty-jsp:" + jettyVersion
// Logging Stack
compile "org.slf4j:slf4j-api:" + slf4jVersion
compile "org.slf4j:jcl-over-slf4j:" + slf4jVersion
compile "org.slf4j:log4j-over-slf4j:" + slf4jVersion
compile "org.slf4j:jul-to-slf4j:" + slf4jVersion
compile "ch.qos.logback:logback-classic:" + logbackVersion
// Jackson
compile "com.fasterxml.jackson.core:jackson-databind:" + jacksonVersion
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:" + jacksonVersion
//compile "com.fasterxml.jackson.datatype:jackson-datatype-hibernate4:" + jacksonVersion
// Testing
compile "org.testng:testng:" + testngVersion
compile "org.mockito:mockito-core:" + mockitoVersion
compile "org.assertj:assertj-core:" + assertjVersion
}
jar {
baseName = 'spring-boot-pitest'
version = '1.0.0'
}
test {
useTestNG()
minHeapSize = "128m"
maxHeapSize = "512m"
}
pitest {
targetClasses = ['com.company.hello.*']
threads = 6
}
jar {
manifest {
attributes(
"Implementation-Title": "com.company.hello",
"Implementation-Version": version,
"Built-JDK": System.getProperty("java.version"),
"Built-Gradle": gradle.gradleVersion
)
}
}