-
Notifications
You must be signed in to change notification settings - Fork 150
/
Copy pathbuild.gradle
48 lines (39 loc) · 1.49 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
import com.nr.builder.JarUtil
import com.nr.builder.publish.PublishConfig
plugins {
id("maven-publish")
id("signing")
}
evaluationDependsOn(":newrelic-agent")
group = "com.newrelic.agent.java"
task dist(type: Zip, dependsOn: [
project(":newrelic-agent").newrelicVersionedAgentJar,
project(":newrelic-api").jar,
project(":newrelic-api").sourcesJar,
project(":newrelic-api").javadocJar
]) {
archiveFileName.set("newrelic.zip")
destinationDirectory.set(file("$buildDir/zips/"))
into 'newrelic'
from({ JarUtil.getNewRelicJar(project(":newrelic-agent")) }) {
rename(".*", "newrelic.jar")
}
from("$rootDir/LICENSE")
from("$rootDir/THIRD_PARTY_NOTICES.md")
from(project(":newrelic-agent").sourceSets.main.resources) {
include 'newrelic.yml'
include 'extension-example.xml'
include 'extension.xsd'
}
// we don't want the version # in the api jar name
from(project(":newrelic-api").jar.archivePath) { rename { "newrelic-api.jar" } }
// Since sources aren't included in the api jar, include them separately.
from(project(":newrelic-api").sourcesJar.archivePath) { rename { "newrelic-api-sources.jar" } }
from(project(":newrelic-api").javadocJar.archivePath) { rename { "newrelic-api-javadoc.jar" } }
}
PublishConfig.config(
project,
"New Relic Java Agent Bundle",
"Contains all the parts required to run the Java agent for monitoring performance.") { it ->
it.artifact(tasks.dist)
}