Skip to content

Enable Gradle Configuration Cache — by refactoring OSGi/BND plugin#9310

Merged
yschimke merged 4 commits intosquare:masterfrom
yschimke:configCachingM2
Feb 5, 2026
Merged

Enable Gradle Configuration Cache — by refactoring OSGi/BND plugin#9310
yschimke merged 4 commits intosquare:masterfrom
yschimke:configCachingM2

Conversation

@yschimke
Copy link
Collaborator

@yschimke yschimke commented Feb 4, 2026

This commit enables Gradle's Configuration Cache feature — which was blocked by the BND (OSGi bundle) plugin's incompatibility.

The key changes are:

  • A new BndBuildAction class is introduced. This class is a static, configuration-cache-compatible replacement for the BND plugin's default build action.
  • The Osgi.kt build logic is refactored to use this new BndBuildAction instead of directly calling the BND plugin's action, which was not serializable.
  • The STABLE_CONFIGURATION_CACHE feature preview is enabled in settings.gradle.kts.
  • Gradle properties are updated to enable the configuration cache (org.gradle.configuration-cache=true).

This commit enables Gradle's Configuration Cache feature, which was blocked by the BND (OSGi bundle) plugin's incompatibility.

The key changes are:
- A new `BndBuildAction` class is introduced. This class is a static, configuration-cache-compatible replacement for the BND plugin's default build action.
- The `Osgi.kt` build logic is refactored to use this new `BndBuildAction` instead of directly calling the BND plugin's action, which was not serializable.
- The `STABLE_CONFIGURATION_CACHE` feature preview is enabled in `settings.gradle.kts`.
- Gradle properties are updated to enable the configuration cache (`org.gradle.configuration-cache=true`).
@yschimke
Copy link
Collaborator Author

yschimke commented Feb 4, 2026

@swankjesse you touched this last, so may have a good idea. BndBuildAction edits were AI assisted, so I'm somewhat relying on tests.

@yschimke yschimke marked this pull request as ready for review February 4, 2026 23:52
@yschimke yschimke changed the title Enable Gradle Configuration Cache by refactoring OSGi/BND plugin Enable Gradle Configuration Cache — by refactoring OSGi/BND plugin Feb 5, 2026
@yschimke
Copy link
Collaborator Author

yschimke commented Feb 5, 2026

@swankjesse requesting post review - want to have a strict build while I make any follow up changes.

decent chance I need to revert this or fix forward based on your bnd review. But tests are passing.

@yschimke yschimke merged commit a328101 into square:master Feb 5, 2026
51 of 52 checks passed
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