-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
74 lines (65 loc) · 2.41 KB
/
build.gradle
File metadata and controls
74 lines (65 loc) · 2.41 KB
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
plugins {
id 'com.srcclr.gradle'
id 'maven-publish'
id 'bio.terra.pfb.java-library-conventions'
id 'com.github.davidmc24.gradle.plugin.avro' version '1.9.1'
id 'me.champeau.jmh' version '0.7.3'
id 'com.google.cloud.artifactregistry.gradle-plugin' version '2.1.5'
}
repositories {
maven {
// Terra proxy for maven central
url 'https://us-central1-maven.pkg.dev/dsp-artifact-registry/maven-central/'
}
mavenCentral()
maven {
url 'https://us-central1-maven.pkg.dev/dsp-artifact-registry/libs-release/'
}
}
dependencies {
api "org.apache.avro:avro:1.12.1"
implementation 'ch.qos.logback:logback-classic:1.5.27'
testImplementation 'org.json:json:20251224'
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.21.0'
testImplementation 'org.skyscreamer:jsonassert:1.5.3'
}
sourceSets.main.java.srcDirs += ["${buildDir}/generated-src"]
spotless {
java{
// Specifically calling out the "build/generated-src" directory
// to avoid spotless errors on avro generated code in GHA
// ${buildDir}/** doesn't work in GHA
targetExclude "${buildDir}/**", "build/generated-src/**"
}
}
generateAvroJava {
source("library/src/main/avro")
outputDir = file("build/generated-src")
}
compileJava.dependsOn generateAvroJava
apply from: 'generators.gradle'
apply from: "publishing.gradle"
srcclr {
scope = "runtimeClasspath"
}
sourcesJar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
if (hasProperty('buildScan')) {
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
}
jmh {
iterations = 2 // Number of measurement iterations to do.
fork = 2 // How many times to forks a single benchmark. Use 0 to disable forking altogether
operationsPerInvocation = 3 // Operations per invocation.
warmup = '1s' // Time to spend at each warmup iteration.
warmupBatchSize = 10 // Warmup batch size: number of benchmark method calls per operation.
warmupForks = 0 // How many warmup forks to make for a single benchmark. 0 to disable warmup forks.
warmupIterations = 1 // Number of warmup iterations to do.
resultFormat = 'JSON'
humanOutputFile = project.file("${project.buildDir}/reports/jmh/human.txt") // human-readable output file
resultsFile = project.file("${project.buildDir}/reports/jmh/results.json") // results file
}