Skip to content

Conversation

@nataphonk
Copy link

Fix incremental build caching issue

Problem

The plugin was breaking Gradle's incremental builds by forcing tasks to always recompile, significantly impacting build performance.

Solution

  • Removed task.outputs.upToDateWhen { false } logic that prevented caching
  • Tasks now properly marked as UP-TO-DATE on subsequent builds

Impact

  • compileTestKotlin and other tasks now cache correctly
  • Significant build time reduction for all users

Testing

Tested locally - confirmed tasks are properly cached after the fix.

The plugin was breaking Gradle's incremental build by setting task.outputs.upToDateWhen { false } which forced recompilation every time. This particularly affected the compileTestKotlin task.

Changes:
- Removed the upToDateWhen { false } logic that broke caching
- Simplified the compilation task configuration
- Ensured directory creation happens at the right time without affecting caching

This fix allows proper incremental builds to work, significantly improving build performance for projects using the inspektor plugin.
@nataphonk nataphonk force-pushed the fix-incremental-build branch from 3809219 to fe2f4ad Compare August 14, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant