-
Notifications
You must be signed in to change notification settings - Fork 147
/
build.gradle
78 lines (66 loc) · 2.65 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
plugins {
id 'com.github.prokod.gradle-crossbuild' version '0.14.1' apply false
id "org.jetbrains.kotlin.jvm" version "1.8.21" apply false
id "com.newrelic.gradle-verify-instrumentation-plugin" version "4.0" apply false
id "com.newrelic.gradle-compatibility-doc-plugin" version "1.1" apply false
id "com.github.spotbugs" version "5.0.14" apply false
}
allprojects {
apply plugin: 'idea'
// ignores MANIFEST.MF
normalization {
runtimeClasspath {
metaInf {
ignoreManifest()
}
}
}
group = 'com.newrelic.agent.java'
version = agentVersion + (project.findProperty("release") == "true" ? "" : "-SNAPSHOT")
version = version + (project.findProperty("release-suffix") != null ? project.findProperty("release-suffix") : "")
idea.module {
outputDir file('build/classes/main')
testOutputDir file('build/classes/test')
}
if (project.convention.findPlugin(JavaPluginConvention)) {
// Change the output directory for the main and test source sets back to the old path
sourceSets.main.output.classesDir = new File(buildDir, "classes/main")
sourceSets.test.output.classesDir = new File(buildDir, "classes/test")
}
tasks.withType(Copy) {
includeEmptyDirs = false
}
}
// This fixes an issue with intellij where the test output build path is incorrect for the top-level java_agent module
idea.module {
testOutputDir = file('test')
excludeDirs += file("automation")
}
subprojects {
repositories {
mavenLocal()
mavenCentral()
}
def isJavaProject = ![
'instrumentation', // is a parent project
'instrumentation-build', // is a build utility
'newrelic-java', // this is a project used exclusively for bundling the zip file.
'infinite-tracing', // has its own plans
].contains(project.name)
if (isJavaProject) {
project.ext.javaProject = true
apply from: "$rootProject.projectDir/gradle/script/java.gradle"
} else {
// This fixes an issue with intellij where the test output build path is incorrect for non-java projects
idea.module {
testOutputDir = file('test')
}
}
}
ext {
// when upgrading ASM, check the javadoc for the following classes:
// SynchronizedAnnotationNode, SynchronizedClassNode, SynchronizedFieldNode, SynchronizedInnerClassNode, SynchronizedMethodNode,
// SynchronizedModuleExportNode, SynchronizedModuleNode, SynchronizedModuleOpenNode, SynchronizedModuleProvideNode, SynchronizedModuleRequireNode,
// SynchronizedTypeAnnotationNode
asmVersion="9.7"
}