-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
187 lines (156 loc) · 5.53 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("pl.allegro.tech.build:axion-release-plugin:${axionReleasePluginVersion}")
classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2"
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'signing'
apply plugin: 'maven'
apply plugin: 'pl.allegro.tech.build.axion-release'
apply plugin: 'jacoco'
apply plugin: "com.github.kt3k.coveralls"
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = 'uk.co.caeldev'
repositories {
mavenCentral()
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/releases/"
}
}
configurations.all {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
scmVersion {
tag {
prefix = 'RELEASE'
}
}
version = scmVersion.version
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
jar {
enabled = true
archivesBaseName = rootProject.name
group = group
version = version
manifest {
attributes 'Implementation-Title': 'Base Auth2 Server',
'Implementation-Version': version,
'Built-By': System.getProperty('user.name'),
'Built-Date': new Date(),
'Built-JDK': System.getProperty('java.version'),
'Built-Gradle': gradle.gradleVersion,
'Main-Class' : 'com.petehouston.greet.Program'
}
}
bootJar {
classifier = 'boot'
mainClassName = 'no.main.application.class'
}
artifacts {
archives jar
archives javadocJar
archives sourcesJar
}
signing {
sign configurations.archives
required = { gradle.taskGraph.hasTask("uploadArchives") && !version.endsWith("SNAPSHOT") }
}
jacocoTestReport {
reports {
xml.enabled true
csv.enabled false
html.enabled false
html.destination file("${buildDir}/jacoco")
}
}
coveralls {
jacocoReportPath 'build/reports/jacoco/test/jacocoTestReport.xml'
}
tasks.coveralls {
dependsOn 'check'
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
authentication(userName: "${System.env.ossrhUsername}", password: "${System.env.ossrhPassword}")
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
authentication(userName: "${System.env.ossrhUsername}", password: "${System.env.ossrhPassword}")
}
//repository(url: "/Users/me/.m2/repository")
pom.project {
parent {
groupId 'org.springframework.boot'
artifactId 'spring-boot-starter-parent'
version "${springBootVersion}"
}
name 'Base Auth2 Server'
packaging "jar"
description "A Library to have a Oauth2 server using mongo db"
url "https://github.com/caelcs/base-auth2-server"
scm {
url "https://github.com/caelcs/base-auth2-server.git"
connection "https://github.com/caelcs/base-auth2-server.git"
developerConnection "https://github.com/caelcs/base-auth2-server.git"
}
licenses {
license {
name "MIT"
url "http://opensource.org/licenses/MIT"
distribution "repo"
}
}
developers {
developer {
id "caelcs"
name "Adolfo Custidiano"
email "[email protected]"
}
}
}
}
}
}
dependencies {
implementation "org.springframework.boot:spring-boot-starter-web"
implementation "org.springframework.boot:spring-boot-starter-security"
implementation "org.springframework.security.oauth:spring-security-oauth2"
implementation "com.google.code.gson:gson:${gsonVersion}"
implementation "com.google.guava:guava:${guavaVersion}"
implementation "uk.co.caeldev:spring-security-mongo:${springSecurityMongoVersion}"
implementation "uk.co.caeldev:spring-mvc-utils:${springMvcUtilsVersion}"
implementation "org.apache.commons:commons-lang3:${apacheCommonsLang3Version}"
testImplementation "org.springframework.boot:spring-boot-starter-test"
testImplementation "org.assertj:assertj-core:${assertjCoreVersion}"
testImplementation "uk.org.fyodor:fyodor-core:${fyodorVersion}"
testImplementation "uk.org.fyodor:fyodor-junit:${fyodorVersion}"
testImplementation "io.rest-assured:rest-assured:${restAssuredVersion}"
testImplementation "com.github.tomakehurst:wiremock:${wiremockVersion}"
testImplementation "com.github.fakemongo:fongo:${fongoVersion}"
testImplementation "org.springframework.boot:spring-boot-starter-thymeleaf"
testImplementation "org.thymeleaf.extras:thymeleaf-extras-springsecurity4"
}
task wrapper(type: Wrapper) {
gradleVersion = rootGradleVersion
}