forked from ocadotechnology/newrelic-alerts-configurator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
144 lines (124 loc) · 5.02 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
buildscript {
repositories {
jcenter()
}
}
allprojects {
group = 'com.ocadotechnology.newrelicalertsconfigurator'
version = getPublicationVersion()
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava.options.encoding = 'UTF-8'
}
private def getPublicationVersion() {
if (project.hasProperty('build_version')) {
def version = project.getProperty('build_version')
if (version) {
return version
}
}
return '3.3.0-SNAPSHOT'
}
subprojects {
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
compileOnly 'org.projectlombok:lombok:1.16.16'
compile 'org.slf4j:slf4j-api:1.7.21'
testCompile "junit:junit:4.12"
testCompile 'com.google.guava:guava:20.0'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile 'com.github.tomakehurst:wiremock:2.1.12'
testCompile 'org.assertj:assertj-core:3.6.1'
}
}
configure(subprojects - project(':newrelic-alerts-configurator-examples')) {
if(project.hasProperty('release')) {
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
required { !version.endsWith("-SNAPSHOT") && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
uploadArchives {
doFirst {
println "Uploading archive ${project.name} in version ${version}"
}
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'NewRelic Alerts Configurator'
packaging 'jar'
// optionally artifactId can be defined here
description 'NewRelic Alerts Configurator can be used to configure NewRelic alerts for your application. Instead of defining alerts through UI you can define them in code. It allows you to automatize alerts configuration, easily recover them in case of wipe out and have full history of changes in your version control system.'
url 'https://github.com/ocadotechnology/newrelic-alerts-configurator'
scm {
connection 'scm:git:git://github.com/ocadotechnology/newrelic-alerts-configurator.git'
developerConnection 'scm:git:[email protected]:ocadotechnology/newrelic-alerts-configurator.git'
url 'https://github.com/ocadotechnology/newrelic-alerts-configurator'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
organization {
name 'Ocado Technology'
url 'http://www.ocadotechnology.com/'
}
developers {
developer {
id 'panda.team'
name 'Panda Team'
email '[email protected]'
}
}
}
}
}
}
}
}
project(':newrelic-api-client') {
dependencies {
compile 'commons-io:commons-io:2.5'
compile 'org.apache.commons:commons-lang3:3.5'
compile 'org.glassfish.jersey.core:jersey-client:2.24.1'
compile 'org.glassfish.jersey.media:jersey-media-json-jackson:2.24.1'
compile 'com.fasterxml.jackson.core:jackson-databind:2.8.4'
compile 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.8.4'
compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.8.4'
}
}
project(':newrelic-alerts-configurator') {
dependencies {
compile project(':newrelic-api-client')
}
}
project(':newrelic-alerts-configurator-examples') {
dependencies {
compile project(':newrelic-alerts-configurator')
}
}