-
Notifications
You must be signed in to change notification settings - Fork 48
/
build.gradle
168 lines (139 loc) · 4.87 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
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
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: '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
repositories {
jcenter()
mavenCentral()
maven {
url "https://oss.jfrog.org/libs-snapshot/"
}
}
scmVersion {
tag {
prefix = 'RELEASE'
}
}
group = 'uk.co.caeldev'
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 {
archivesBaseName = rootProject.name
group = group
version = version
manifest {
attributes 'Implementation-Title': 'Spring Security Mongo',
'Implementation-Version': version,
'Built-By': System.getProperty('user.name'),
'Built-Date': new Date(),
'Built-JDK': System.getProperty('java.version'),
'Built-Gradle': gradle.gradleVersion
}
}
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")
}
}
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 'Spring Security Mongo'
packaging "jar"
description "A Commons Library to provide the repositories for mongo db"
url "https://github.com/caelcs/spring-security-mongo"
scm {
url "https://github.com/caelcs/spring-security-mongo.git"
connection "https://github.com/caelcs/spring-security-mongo.git"
developerConnection "https://github.com/caelcs/spring-security-mongo.git"
}
licenses {
license {
name "MIT"
url "http://opensource.org/licenses/MIT"
distribution "repo"
}
}
developers {
developer {
id "caelcs"
name "Adolfo Custidiano"
email "[email protected]"
}
}
}
}
}
}
coveralls {
jacocoReportPath 'build/reports/jacoco/test/jacocoTestReport.xml'
}
tasks.coveralls {
dependsOn 'check'
}
dependencies {
implementation "org.springframework.boot:spring-boot-starter-web:${springBootVersion}"
implementation "org.springframework.boot:spring-boot-starter-security:${springBootVersion}"
implementation "org.springframework.boot:spring-boot-starter-data-mongodb:${springBootVersion}"
implementation "org.springframework.security.oauth:spring-security-oauth2:${springOAuth2Version}"
implementation "com.google.guava:guava:${guavaVersion}"
implementation "com.fasterxml.jackson.core:jackson-databind"
implementation "org.apache.commons:commons-lang3:3.7"
testImplementation "org.springframework.boot:spring-boot-starter-test:${springBootVersion}"
testImplementation "org.assertj:assertj-core:${assertjCoreVersion}"
testImplementation "uk.org.fyodor:fyodor-core:${fyodorVersion}"
testImplementation "com.github.fakemongo:fongo:${fongoVersion}"
testImplementation "com.lordofthejars:nosqlunit-mongodb:${nosqlunitMongodbVersion}"
testImplementation "com.jayway.jsonpath:json-path:${jsonPathVersion}"
}
task wrapper(type: Wrapper) {
gradleVersion = rootGradleVersion
}