-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
223 lines (186 loc) · 6.26 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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
buildscript {
ext {
springBootVersion = '2.0.5.RELEASE'
ratpackVersion = '1.5.4'
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:2.2.+'
classpath 'com.bmuschko:gradle-docker-plugin:3.2.5'
classpath 'com.netflix.nebula:nebula-release-plugin:9.0.0'
classpath 'com.netflix.nebula:gradle-info-plugin:3.2.1'
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
classpath 'com.github.jruby-gradle:jruby-gradle-plugin:1.3.3'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.6.3'
classpath 'com.netflix.nebula:nebula-publishing-plugin:4.9.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
}
}
ext {
bintrayUserName = (project.hasProperty('BINTRAY_USERNAME') ? project.findProperty('BINTRAY_USERNAME') : System.getenv()['BINTRAY_USERNAME'])
bintrayPassword = (project.hasProperty('BINTRAY_PASSWORD') ? project.findProperty('BINTRAY_PASSWORD') : System.getenv()['BINTRAY_PASSWORD'])
bintrayRepository = (project.hasProperty('BINTRAY_REPOSITORY') ? project.findProperty('BINTRAY_REPOSITORY') : System.getenv()['BINTRAY_REPOSITORY'])
}
apply plugin: 'com.jfrog.bintray'
group = 'ru.ratauth'
allprojects {
apply plugin: 'io.spring.dependency-management'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'idea'
apply plugin: 'nebula.release'
apply plugin: 'nebula.info'
repositories {
mavenCentral()
jcenter()
mavenLocal()
maven { url "https://repo.spring.io/milestone" }
}
configurations {
compile.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
}
dependencyManagement {
imports {
mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
}
dependencies {
//common
dependency 'org.projectlombok:lombok:1.18.12'
dependency 'com.google.code.findbugs:annotations:3.0.1'
dependency 'org.apache.commons:commons-lang3:3.7'
dependency 'com.google.guava:guava:21.0'
dependency 'com.google.inject:guice:4.1.0'
dependency 'org.codehaus.groovy:groovy-all:2.4.7'//for ratpack server config
dependency 'com.auth0:java-jwt:3.2.0'
//reactive
dependency 'io.reactivex:rxjava:1.1.6'
dependency "io.ratpack:ratpack-rx:${ratpackVersion}"
dependency ("io.ratpack:ratpack-spring-boot:${ratpackVersion}") {
exclude "org.springframework.boot:spring-boot-autoconfigure"
}
dependency "io.ratpack:ratpack-groovy:${ratpackVersion}"
dependency "io.ratpack:ratpack-hystrix:${ratpackVersion}"
//crypto
dependency 'com.nimbusds:nimbus-jose-jwt:4.20'
//test
dependency "io.ratpack:ratpack-test:${ratpackVersion}"
dependency 'org.spockframework:spock-core:1.1-groovy-2.4-rc-2'
dependency 'org.spockframework:spock-spring:1.1-groovy-2.4-rc-2'
dependency 'org.assertj:assertj-core:3.6.2'
dependency 'org.skyscreamer:jsonassert:1.5.0'
dependency 'io.rest-assured:rest-assured:3.0.2'
}
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'jacoco'
apply plugin: 'pmd'
apply plugin: 'findbugs'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'codenarc'
group = rootProject.group
sourceCompatibility = 1.8
targetCompatibility = 1.8
apply plugin: 'com.jfrog.bintray'
apply plugin: 'nebula.maven-publish'
apply plugin: 'nebula.source-jar'
apply plugin: 'nebula.javadoc-jar'
bintray {
user = bintrayUserName
key = bintrayPassword
publications = ['nebula']
dryRun = false
publish = true
pkg {
repo = 'maven-releases'
userOrg = 'alfa-laboratory'
name = 'ratauth'
desc = project.description
websiteUrl = 'https://github.com/alfa-laboratory/${project.name}'
issueTrackerUrl = 'https://github.com/alfa-laboratory/${project.name}/issues'
vcsUrl = 'https://github.com/alfa-laboratory/${project.name}.git'
licenses = ['MIT']
labels = ['gradle', 'ratauth']
publicDownloadNumbers = true
attributes = [:]
version {
name = project.version
vcsTag = project.version
attributes = [:]
}
}
}
bintrayUpload.onlyIf { !project.version.toString().toUpperCase().endsWith("-SNAPSHOT") }
codenarcMain {
configFile = file("${getRootDir()}/gradle/codenarc.groovy")
exclude 'ru/**/*Stub*'
exclude 'ru/**/RatAuthApplication*'
exclude 'ru/**/AuthorizationHandlers*' //TODO uncomment and fix it!
}
codenarcTest.onlyIf { false }
pmd {
ignoreFailures = false
ruleSets = [] // This overwrites the rules that are being added
ruleSetFiles = files("${project.rootDir}/gradle/pmd-ruleset.xml")
}
tasks.withType(FindBugs) {
reports {
xml.enabled false
html.enabled true
}
}
jacocoTestReport {
reports {
xml.enabled true
csv.enabled true
html.destination new File("${buildDir}/jacocoHtml")
}
}
tasks.withType(Test) { task ->
minHeapSize = '32m'
maxHeapSize = '256m'
jvmArgs '-XX:MaxPermSize=512m'
jacocoTestReport.executionData += files("$buildDir/jacoco/${task.name}.exec")
}
findbugs {
sourceSets = [sourceSets.main]
effort = 'max'
reportLevel = 'high'
excludeFilter = file("$rootDir/gradle/findbugs-exclude.xml")
}
jar {
archiveName = project.name + '.jar'
}
dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
compileOnly 'com.google.code.findbugs:annotations'
compileOnly 'org.slf4j:slf4j-api'
compile 'org.codehaus.groovy:groovy-all'
compile 'io.reactivex:rxjava'
//test
testCompile 'org.springframework.boot:spring-boot-starter-test'
testCompile 'org.spockframework:spock-core', {
exclude module: 'groovy-all'
}
testCompile 'org.spockframework:spock-spring', {
exclude module: 'groovy-all'
}
testCompile 'io.ratpack:ratpack-test'
testCompile 'org.assertj:assertj-core'
testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
}
}
idea {
project {
jdkName '1.8'
languageLevel '1.8'
vcs 'Git'
}
}