Skip to content

Commit

Permalink
build: ensure :processResources runs before :compileJava (#1379)
Browse files Browse the repository at this point in the history
### Motivation
There are some build steps that require resources to be present at
compile time. Due to some Gradle magic, the `processResources` task is
not always executed before `compileJava`, which leads to failures when
f. ex. generating plugin manifests with our annotation processing.

### Modification
Require the `processResources` task to run before `compileJava` by
adding a dependency.

### Result
`processResources` now runs before `compileJava` again, fixing all
issues with plugin manifest generation during compile.
  • Loading branch information
derklaro authored Mar 21, 2024
1 parent 7f8f63e commit 1a02a0d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ subprojects {
applyDefaultJavadocOptions(options)
}

tasks.withType<JavaCompile> {
dependsOn(tasks.withType<ProcessResources>())
}

// all these projects are publishing their java artifacts
configurePublishing("java", true)
}
Expand Down

0 comments on commit 1a02a0d

Please sign in to comment.