xref: /aosp_15_r20/external/perfmark/java15/build.gradle.kts (revision 27e8546d0ef5f99cf83d5252272c7dd38d18d29a)
1 import net.ltgt.gradle.errorprone.errorprone
2 
<lambda>null3 plugins {
4     id("io.github.reyerizo.gradle.jcstress")
5 }
6 
<lambda>null7 buildscript {
8     extra.apply{
9         set("moduleName", "io.perfmark.javafifteen")
10     }
11 }
12 
13 val jdkVersion = JavaVersion.VERSION_15
14 
15 description = "PerfMark Java15 API"
16 
<lambda>null17 sourceSets {
18     create("jmh")
19 }
20 
<lambda>null21 val jmhImplementation by configurations.getting {
22     extendsFrom(configurations.implementation.get())
23 }
24 
<lambda>null25 val jmhAnnotationProcessor by configurations.getting {
26     extendsFrom(configurations.annotationProcessor.get())
27 }
28 
<lambda>null29 dependencies {
30     implementation(project(":perfmark-impl"))
31     compileOnly(libs.jsr305)
32 
33     testImplementation(project(":perfmark-api"))
34     testImplementation(project(":perfmark-testing"))
35     jcstressImplementation(project(":perfmark-impl"))
36 
37     jmhImplementation(project(":perfmark-api"))
38     jmhImplementation(project(":perfmark-impl"))
39     jmhImplementation(project(":perfmark-java15"))
40     jmhImplementation(project(":perfmark-testing"))
41 
42     jmhImplementation(libs.junit)
43     jmhImplementation(libs.jmhcore)
44     jmhAnnotationProcessor(libs.jmhanno)
45 }
46 
<lambda>null47 tasks.named<JavaCompile>("compileJava") {
48     sourceCompatibility = jdkVersion.toString()
49     targetCompatibility = jdkVersion.toString()
50 }
51 
<lambda>null52 tasks.named<Javadoc>("javadoc") {
53     exclude("io/perfmark/java15/**")
54 }
55 
<lambda>null56 tasks.register<Test>("jmh") {
57     description = "Runs integration tests."
58     group = "stress"
59 
60     testClassesDirs = sourceSets["jmh"].output.classesDirs
61     classpath = sourceSets["jmh"].runtimeClasspath
62 }
63 
64 //  ./gradlew --no-daemon clean :perfmark-java9:jcstress
<lambda>null65 jcstress {
66     jcstressDependency = "org.openjdk.jcstress:jcstress-core:0.5"
67     // mode "tough"
68     deoptRatio = "2"
69 }
70 
71 
<lambda>null72 tasks.named<JavaCompile>("compileJmhJava") {
73     options.errorprone.excludedPaths.set(".*/build/generated/sources/annotationProcessor/.*")
74 }
75 
76 
<lambda>null77 tasks.named<JavaCompile>("compileJcstressJava") {
78     options.errorprone.excludedPaths.set(".*/build/generated/sources/annotationProcessor/.*")
79 }
80