-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
build.gradle.kts
69 lines (61 loc) · 2.29 KB
/
build.gradle.kts
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
plugins {
id("gradlebuild.internal.java")
id("gradlebuild.performance-test")
}
description = """Performance tests for the build scan plugin
| Run as part of the GE pipeline.
| """.trimMargin()
dependencies {
testFixturesApi(project(":internal-performance-testing"))
testFixturesApi(libs.commonsIo)
testFixturesApi(project(":base-services"))
testFixturesImplementation(project(":internal-testing"))
testFixturesImplementation(project(":internal-integ-testing"))
testFixturesImplementation(project(":logging"))
testFixturesImplementation(libs.groovyJson)
performanceTestDistributionRuntimeOnly(project(":distributions-full")) {
because("so that all Gradle features are available")
}
}
performanceTest.registerTestProject<gradlebuild.performance.generator.tasks.JvmProjectGeneratorTask>("javaProject") {
dependencyGraph.run {
size = 200
depth = 5
useSnapshotVersions = false // snapshots should not have a build scan specific performance impact
}
buildSrcTemplate = "buildsrc-plugins"
setProjects(50)
sourceFiles = 200
testSourceFiles = 50 // verbose tests are time consuming
filesPerPackage = 5
linesOfCodePerSourceFile = 150
numberOfScriptPlugins = 30
rootProjectTemplates = listOf("root")
subProjectTemplates = listOf("project-with-source")
templateArgs = mapOf(
"fullTestLogging" to true,
"failedTests" to true,
"projectDependencies" to true,
"manyPlugins" to true,
"manyScripts" to true
)
daemonMemory = "4096m"
maxWorkers = 4
doLast {
File(destDir, "build.gradle").appendText("""
// gradle-profiler doesn't support expectFailure
subprojects {
afterEvaluate {
test.ignoreFailures = true
}
}
""")
}
}
tasks.withType<gradlebuild.performance.tasks.PerformanceTest>().configureEach {
systemProperties["incomingArtifactDir"] = "$rootDir/incoming/"
environment("GRADLE_INTERNAL_REPO_URL", System.getenv("GRADLE_INTERNAL_REPO_URL"))
environment("GRADLE_INTERNAL_REPO_USERNAME", System.getenv("GRADLE_INTERNAL_REPO_USERNAME"))
environment("GRADLE_INTERNAL_REPO_PASSWORD", System.getenv("GRADLE_INTERNAL_REPO_PASSWORD"))
reportGeneratorClass.set("org.gradle.performance.results.BuildScanReportGenerator")
}