Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Build Caching of Maven plugin tasks #3531

Merged
merged 9 commits into from
Mar 18, 2024

Conversation

adam-enko
Copy link
Member

@adam-enko adam-enko commented Mar 13, 2024

Update tasks for building the Dokka Maven plugin, so that Build Cache works across machines.

(Alternative title: TIL that the compileKotlin task output includes caches)

Summary

  • Update MvnExec task:

    • separate classes/resources inputs
    • filter and annotate classes input:
      1. only include .class files (the compileKotlin file includes caches)
      2. annotate with @Classpath so Gradle will be able to normalize the files
  • Update generatePom task to manually register the version inputs, to ensure Gradle will re-run the task if they change.

  • Update helpMojoResources to exclude maven-plugin-help.properties, because it contains a property with an absolute file path, meaning that Build Cache cannot be shared between CI and local machines.

- separate classes/resources inputs
- filter and annotate classes input:
   1. only include `.class` files (the compileKotlin file includes caches)
   2. annotate with `@Classpath` so Gradle will be able to normalize the files
@adam-enko adam-enko added the infrastructure Everything related to builds tools, CI configurations and project tooling label Mar 13, 2024
@adam-enko adam-enko self-assigned this Mar 13, 2024
@adam-enko adam-enko marked this pull request as ready for review March 15, 2024 12:08
Copy link
Collaborator

@whyoleg whyoleg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adam-enko adam-enko merged commit 8459efe into master Mar 18, 2024
12 checks passed
@adam-enko adam-enko deleted the build-logic/fix-cachability-maven-tasks branch March 18, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Everything related to builds tools, CI configurations and project tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants