-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
205 lines (172 loc) · 6.41 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
buildscript {
ext {
querydslVersion = "4.1.4"
}
repositories {
maven {
url MAVEN_URL // The Artifactory (preferably virtual) repository to resolve from
credentials { // Optional resolver credentials (leave out to use anonymous resolution)
username = MAVEN_USER // Artifactory user name
password = MAVEN_PASSWORD // Password or API Key
}
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
configurations.all {
resolutionStrategy.cacheDynamicVersionsFor 5, "minutes"
}
dependencies {
classpath("io.spring.gradle:dependency-management-plugin:1.0.5.RELEASE")
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath "gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:1.5.2"
}
}
plugins {
id "com.gorylenko.gradle-git-properties" version "2.0.0"
id "com.ewerk.gradle.plugins.querydsl" version "1.0.10"
}
apply plugin: "java"
apply plugin: "idea"
apply plugin: "org.springframework.boot"
apply plugin: "com.ewerk.gradle.plugins.querydsl"
apply plugin: "maven-publish"
apply plugin: "com.gorylenko.gradle-git-properties"
apply plugin: "io.spring.dependency-management"
version = "0.0.1-SNAPSHOT"
jar {
baseName = "personmgr"
version = version
}
springBoot {
buildInfo()
}
description = """personmgr"""
repositories {
maven {
url uri(MAVEN_URL)
credentials {
username = MAVEN_USER
password = MAVEN_PASSWORD
}
}
}
configurations {
compile.exclude module: "spring-boot-starter-tomcat"
compile.exclude module: "hystrix-core"
compile.exclude module: "feign-hystrix"
}
dependencies {
compile("ru.majordomo.hms.rc.user:resources:[1.5.26, 1.6)")
compile("ru.majordomo.hms.rc.staff:resources:[2.0.11, 2.1)")
compile("dnsjava:dnsjava:2.1.8")
compile("org.springframework.boot:spring-boot-starter-data-mongodb")
compile("org.springframework.boot:spring-boot-starter-amqp")
compile("org.springframework.boot:spring-boot-starter-jdbc")
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.boot:spring-boot-starter-web-services")
compile("org.springframework.boot:spring-boot-starter-cache")
compile("org.springframework.boot:spring-boot-starter-jetty")
compile("org.springframework.boot:spring-boot-starter-aop")
compile("org.springframework.boot:spring-boot-configuration-processor")
compile("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client")
compile("org.springframework.cloud:spring-cloud-starter-openfeign")
compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")
compile("org.springframework.cloud:spring-cloud-netflix-hystrix-stream")
compile("org.springframework.cloud:spring-cloud-starter-config")
compile("org.springframework.cloud:spring-cloud-starter-oauth2")
compile("org.springframework.cloud:spring-cloud-starter-sleuth")
compile('org.springframework.boot:spring-boot-starter-data-redis')
compile('org.springframework.boot:spring-boot-starter-mustache')
compile("org.apache.xmlrpc:xmlrpc-client:3.1.3")
compile("org.apache.httpcomponents:httpmime:4.5.6")
compile("commons-io:commons-io:2.6")
compile("commons-validator:commons-validator:1.6")
compile("com.google.guava:guava:27.0-jre")
compile("com.mysql:management:1.1.6") {
exclude(module: "jmxtools")
}
compile("org.hibernate:hibernate-validator:6.0.13.Final")
compile("org.hibernate:hibernate-validator-cdi:6.0.13.Final")
compile("javax.el:javax.el-api:3.0.0")
compile("org.glassfish.web:javax.el:2.2.4")
compile "com.querydsl:querydsl-mongodb:$querydslVersion"
compile "com.querydsl:querydsl-apt:$querydslVersion"
testCompile("org.springframework.boot:spring-boot-starter-test") {
exclude(module: "commons-logging")
}
testCompile('de.bwaldvogel:mongo-java-server:1.19.0')
compile("com.cronutils:cron-utils:5.0.1")
compile("com.googlecode.libphonenumber:libphonenumber:8.10.2")
compile("net.javacrumbs.shedlock:shedlock-spring:0.10.0")
compile("net.javacrumbs.shedlock:shedlock-provider-mongo:0.8.0")
compile("org.jongo:jongo:1.4.0")
compile("org.projectlombok:lombok:1.18.4")
compile group: 'com.jayway.jsonpath', name: 'json-path', version: '2.4.0'
}
repositories {
mavenCentral()
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springVersion}"
}
}
def generatedSrcDir = "src/main/generated"
querydsl {
springDataMongo = true
querydslSourcesDir = file(generatedSrcDir)
library = "com.querydsl:querydsl-mongodb:$querydslVersion"
}
idea {
module {
sourceDirs += file(generatedSrcDir)
generatedSourceDirs += file(generatedSrcDir)
}
}
def versionPropsFile = file("version.properties")
def versionBuild
if (versionPropsFile.canRead()) {
def Properties versionProps = new Properties()
versionProps.load(new FileInputStream(versionPropsFile))
versionBuild = versionProps["VERSION_BUILD"].toInteger()
} else {
throw new GradleException("Could not read version.properties!")
}
ext.autoIncrementBuildNumber = {
if (versionPropsFile.canRead()) {
def Properties versionProps = new Properties()
versionProps.load(new FileInputStream(versionPropsFile))
versionBuild = versionProps["VERSION_BUILD"].toInteger() + 1
versionProps["VERSION_BUILD"] = versionBuild.toString()
versionProps.store(versionPropsFile.newWriter(), null)
} else {
throw new GradleException("Could not read version.properties!")
}
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId "ru.majordomo.hms.personmgr"
artifactId "exceptions"
version "1.0." + versionBuild
artifact exceptionJar
}
}
repositories {
maven {
url uri(MAVEN_URL)
credentials {
username = MAVEN_USER
password = MAVEN_PASSWORD
}
}
}
}
publish.doFirst autoIncrementBuildNumber
task exceptionJar(type: Jar, dependsOn: compileJava) {
baseName = "exceptions"
from sourceSets.main.output.classesDir
include "ru/majordomo/hms/personmgr/exception/**"
}