Skip to content

Refactor SQLite compilation tasks #194

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

Merged
merged 5 commits into from
May 22, 2025
Merged

Refactor SQLite compilation tasks #194

merged 5 commits into from
May 22, 2025

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