forked from spring-attic/github-analytics
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
88 lines (75 loc) · 2.16 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
apply plugin: 'groovy'
apply plugin: 'org.springframework.boot'
apply plugin: 'spring-cloud-contract'
apply plugin: 'maven-publish'
apply from: 'gradle/pipeline.gradle'
buildscript {
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:1.5.2.RELEASE"
classpath "org.springframework.cloud:spring-cloud-contract-gradle-plugin:1.0.4.RELEASE"
}
}
group = 'com.example.github'
version = getProp('newVersion') ?: '0.0.1-SNAPSHOT'
ext {
projectGroupId = project.group
projectArtifactId = project.name
projectVersion = project.version
stubrunnerIds = 'com.example.github:github-webhook'
}
repositories {
mavenCentral()
mavenLocal()
if (getProp("M2_LOCAL")) {
maven {
url getProp("M2_LOCAL")
}
}
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:$BOM_VERSION"
}
}
contracts {
baseClassForTests = 'org.springframework.github.contract.BaseClass'
}
dependencies {
compile ('org.springframework.analytics:spring-analytics:1.0.0.RELEASE')
compile ('org.springframework.cloud:spring-cloud-starter-eureka')
compile ('org.hibernate:hibernate-validator')
compile ('org.springframework.cloud:spring-cloud-starter-stream-rabbit')
testCompile ('org.springframework.cloud:spring-cloud-starter-contract-stub-runner')
testCompile ('org.springframework.cloud:spring-cloud-stream-test-support')
testCompile ('org.springframework.cloud:spring-cloud-starter-contract-verifier')
testCompile ('org.awaitility:awaitility:2.0.0')
}
publishing {
repositories {
maven {
url getProp('REPO_WITH_JARS') ?: 'http://localhost:8081/artifactory/libs-release-local'
credentials {
username getProp('M2_SETTINGS_REPO_USERNAME') ?: 'admin'
password getProp('M2_SETTINGS_REPO_PASSWORD') ?: 'password'
}
}
}
publications {
mavenJava(MavenPublication) {
artifactId project.name
from components.java
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '3.4.1'
}
String getProp(String propName) {
return hasProperty(propName) ?
(getProperty(propName) ?: System.properties[propName]) : System.properties[propName] ?:
System.getenv(propName)
}