-
Notifications
You must be signed in to change notification settings - Fork 22
/
build.gradle
153 lines (127 loc) · 5.48 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
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.72' apply false
}
allprojects {
group = 'com.ocadotechnology.newrelicalertsconfigurator'
apply plugin: 'java-library'
apply plugin: 'maven'
apply plugin: 'signing'
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava.options.encoding = 'UTF-8'
}
subprojects {
repositories {
mavenCentral()
}
dependencies {
api 'org.slf4j:slf4j-api:1.7.30'
compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
testImplementation 'junit:junit:4.13'
testImplementation 'com.google.guava:guava:29.0-jre'
testImplementation 'org.mockito:mockito-core:3.4.6'
testImplementation 'com.github.tomakehurst:wiremock:2.27.1'
testImplementation 'org.assertj:assertj-core:3.16.1'
}
}
configure(subprojects - project(':newrelic-alerts-configurator-examples')) {
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
artifacts {
archives javadocJar, sourcesJar
}
if (project.hasProperty('release')) {
signing {
required { !version.endsWith("-SNAPSHOT") && gradle.taskGraph.hasTask("uploadArchives") }
useInMemoryPgpKeys(findProperty("signingKey").toString().split("(?<=\\G.{64})").join("\n"), findProperty("signingPassword").toString())
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:git@github.com: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 'panda.team@ocado.com'
}
}
}
}
}
}
}
}
project(':newrelic-api-client') {
dependencies {
api 'commons-io:commons-io:2.7'
api 'org.apache.commons:commons-lang3:3.11'
api 'org.glassfish.jersey.core:jersey-client:2.24.1'
api 'org.glassfish.jersey.media:jersey-media-json-jackson:2.24.1'
api 'org.glassfish.jersey.connectors:jersey-apache-connector:2.24.1'
api 'com.fasterxml.jackson.core:jackson-databind:2.11.1'
api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.1'
api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.1'
implementation 'org.apache.commons:commons-text:1.10.0'
implementation('com.github.k0kubun:graphql-query-builder:0.4.2') {
exclude group: 'com.google.guava', module: 'guava'
}
}
}
project(':newrelic-alerts-configurator') {
dependencies {
api project(':newrelic-api-client')
}
}
project(':newrelic-alerts-configurator-examples') {
apply plugin: 'kotlin'
dependencies {
api project(':newrelic-alerts-configurator')
api project(':newrelic-alerts-configurator-dsl')
}
}
project(':newrelic-alerts-configurator-dsl') {
apply plugin: 'kotlin'
dependencies {
api project(':newrelic-alerts-configurator')
api 'org.jetbrains.kotlin:kotlin-stdlib'
}
}