Skip to content

Commit

Permalink
Fix javac task inputs so that they include modular dependencies apach…
Browse files Browse the repository at this point in the history
…e#12742 (apache#12745)

Fix javac task inputs so that they include modular dependencies apache#12742
  • Loading branch information
dweiss authored and rmuir committed Nov 2, 2023
1 parent 4cac882 commit 68606f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gradle/java/modules.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ allprojects {
tasks.named(sourceSet.getCompileJavaTaskName()).configure({ JavaCompile task ->
task.dependsOn modularPaths.compileModulePathConfiguration

// GH-12742: add the modular path as inputs so that if anything changes, the task
// is not up to date and is re-run. I [dw] believe this should be a @Classpath parameter
// on the task itself... but I don't know how to implement this on an existing class.
// this is a workaround but should work just fine though.
task.inputs.files(modularPaths.compileModulePathConfiguration)

// LUCENE-10327: don't allow gradle to emit an empty sourcepath as it would break
// compilation of modules.
task.options.setSourcepath(sourceSet.java.sourceDirectories)
Expand Down
4 changes: 4 additions & 0 deletions lucene/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,11 @@ Bug Fixes
Build
---------------------

* GITHUB#12742: JavaCompile tasks may be in up-to-date state when modular dependencies have changed
leading to odd runtime errors (Chris Hostetter, Dawid Weiss)

* GITHUB#12612: Upgrade forbiddenapis to version 3.6 and ASM for APIJAR extraction to 9.6. (Uwe Schindler)

* GITHUB#12655: Upgrade to Gradle 8.4 (Kevin Risden)

Other
Expand Down

0 comments on commit 68606f8

Please sign in to comment.