mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-03 03:01:40 +00:00
Gradle build task improvements (#2164)
## Description This fixes a few problems with the Gradle `build` task and subtasks. 1. Spotless was being run on `node_modules`, resulting in errors for out-of-source files. This is now disabled. 2. All tests were running from the `build` task, resulting in unexpected windows popping up. Now only headless tests are run. 3. Headless tests were updated to run from the same root directory as the other tests. ## Meta Merge checklist: - [X] Pull Request title is [short, imperative summary](https://cbea.ms/git-commit/) of proposed changes - [X] The description documents the _what_ and _why_ - [ ] If this PR changes behavior or adds a feature, user documentation is updated - [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly - [ ] If this PR touches configuration, this is backwards compatible with settings back to v2025.3.2 - [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated - [ ] If this PR addresses a bug, a regression test for it is added
This commit is contained in:
@@ -71,7 +71,7 @@ tasks.register('testHeadless', Test) {
|
||||
showStandardStreams = true
|
||||
}
|
||||
exclude '**/*BenchmarkTest*'
|
||||
workingDir = "../"
|
||||
workingDir = new File("${rootDir}")
|
||||
}
|
||||
|
||||
jacoco {
|
||||
@@ -96,3 +96,10 @@ jacocoTestReport {
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
// Only run headless tests from the build task
|
||||
gradle.taskGraph.whenReady { graph ->
|
||||
if (graph.hasTask(build)) {
|
||||
test.enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user