-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
83 lines (64 loc) · 2.21 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
plugins {
id 'io.franzbecker.gradle-lombok' version '1.14' // Last to support Java 7
id "com.jfrog.artifactory" version "4.15.2" apply false
id 'com.jfrog.bintray' version '1.8.5' apply false
id "nebula.release" version "15.0.1"
id 'org.unbroken-dome.test-sets' version '2.2.1'
id 'com.github.ben-manes.versions' version '0.27.0'
id 'com.dorongold.task-tree' version '1.5'
id "com.github.johnrengelman.shadow" version "5.2.0"
id "com.diffplug.gradle.spotless" version "4.3.0"
id "com.github.spotbugs" version "4.0.1"
}
release {
defaultVersionStrategy = nebula.plugin.release.git.opinion.Strategies.SNAPSHOT
}
def isCI = System.getenv("CI") != null
allprojects {
group = 'io.opentelemetry.instrumentation.auto'
if (isCI) {
buildDir = "$rootDir/workspace/${projectDir.path.replace(rootDir.path, '')}/build/"
}
apply from: "$rootDir/gradle/dependencies.gradle"
apply from: "$rootDir/gradle/util.gradle"
}
repositories {
mavenLocal()
jcenter()
mavenCentral()
}
description = 'OpenTelemetry instrumentations for Java'
wrapper {
distributionType = Wrapper.DistributionType.ALL
}
allprojects {
tasks.withType(JavaForkOptions).configureEach {
maxHeapSize = System.properties["ota.forkedMaxHeapSize"]
minHeapSize = System.properties["ota.forkedMinHeapSize"]
jvmArgs "-XX:ErrorFile=/tmp/hs_err_pid%p.log"
}
}
// Writes tasks to file allowing us to leverage CircleCI's file based task parallelization
task writeMuzzleTasksToFile {
doLast {
def muzzleFile = file("${buildDir}/muzzleTasks")
assert muzzleFile.parentFile.mkdirs() || muzzleFile.parentFile.directory
muzzleFile.text = subprojects.findAll { subproject -> subproject.plugins.hasPlugin('muzzle') }
.collect { it.path + ":muzzle" }
.join('\n')
}
}
apply plugin: 'com.diffplug.gradle.spotless'
spotless {
// this formatting is applied at the root level, as some of these files are not in a submodules
// and would be missed otherwise
format 'misc', {
target '**/.gitignore', '**/*.md', '**/*.sh'
targetExclude 'smoke-tests/**/build/**'
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()
}
}
task formatCode(dependsOn: ['spotlessApply'])
check.dependsOn 'spotlessCheck'