Skip to content

Conversation

simolus3
Copy link
Contributor

On all native platforms we currently support, we compile and link a copy of SQLite statically (through the :static-sqlite-driver project).

The way the compilation is currently set up is a suboptimal, as it doesn't allow Gradle to cache outputs effectively:

  1. We're using dependsOn to specify task dependencies, which is not recommended. We should specify file dependencies instead, as that allows Gradle to understand the dependencies better and allows for fine-grained build invalidation.
  2. A lot of the compilation tasks we written using Exec, which does not support caching. To make the build easier to understand while also improving cache invalidation, I've extracted the tasks into independent files.

Finally, I've enabled the build cache, which should allow us to cache outputs (including the compiled sqlite libraries) across CI runs, avoiding a recompilation on every run.

@simolus3 simolus3 requested a review from stevensJourney May 22, 2025 09:22
@simolus3 simolus3 merged commit d61e679 into main May 22, 2025
3 checks passed
@simolus3 simolus3 deleted the build-cache branch May 22, 2025 10:10
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.

2 participants