forked from newrelic/newrelic-java-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
58 lines (49 loc) · 1.85 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
plugins {
id "org.jetbrains.kotlin.jvm" version "1.3.31" apply false
id "com.newrelic.gradle-verify-instrumentation-plugin" version "3.2" apply false
id "com.newrelic.gradle-compatibility-doc-plugin" version "1.1" apply false
}
allprojects {
apply plugin: 'idea'
group = 'com.newrelic.agent.java'
version = agentVersion + (project.findProperty("release") == "true" ? "" : "-SNAPSHOT")
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()
jcenter()
}
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')
}
}
}