Commit 64c97bf
committed
Fix remaining test failures for Gradle 8 and 9 compatibility
- Fix RequireJsTask: Add ProcessBuilder fallback for test contexts where project.javaexec is not available
- Ensure all ProcessBuilder command elements are explicitly converted to strings
- Consume output streams to prevent process from hanging
- Fix JsPluginFunctionalTest: Implement getPatternSetFactory() in TestTask class
- Required for SourceTask subclasses in Gradle 9
- Inject PatternSetFactory via constructor
- Fix JsHintTask: Refactor warning detection logic to match JSHint behavior
- Add setCheckSymbols(true) and setCheckGlobalThis(false) to compiler options
to enable proper undefined variable detection
- Implement custom BasicErrorManager to capture all Closure Compiler diagnostics
- Refine warning detection logic to differentiate between lint warnings and
critical warnings (undefined variables, unused variables, strict mode violations)
- When JSHint options (undef, unused, strict) are enabled, fail on relevant warnings
- When no options are enabled, only fail on critical warnings (undefined variables)
- Filter out lint-only warnings (using var, missing semicolon) when checking for
critical issues
- Add comprehensive debug logging for diagnostic group configuration and
warning detection
- Fix JavaScriptExtension: Use source.configure(closure) for proper delegation
All tests now pass with both Gradle 8.14.3 and Gradle 9.2.1.1 parent 90ae098 commit 64c97bf
File tree
4 files changed
+411
-26
lines changed- src
- main/groovy/com/eriwen/gradle/js
- tasks
- test/groovy/com/eriwen/gradle/js
4 files changed
+411
-26
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
0 commit comments