Skip to content

Enable configuration cache #195

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
Jul 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
- name: Gradle publish
run: |
./gradlew \
--no-configuration-cache \
-PGITHUB_PUBLISH_TOKEN="${{ secrets.GITHUB_TOKEN }}" \
-PsigningInMemoryKey="${{ secrets.SIGNING_KEY }}" \
-PsigningInMemoryKeyId="${{ secrets.SIGNING_KEY_ID }}" \
Expand Down Expand Up @@ -77,6 +78,8 @@ jobs:
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Build frameworks
run: "./gradlew PowerSyncKotlin:buildRelease"

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- name: Build Docs
run: |
./gradlew \
--no-configuration-cache \
-PGITHUB_PUBLISH_TOKEN=${{ secrets.GITHUB_TOKEN }} \
dokkaGenerate
shell: bash
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ jobs:
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: Build and run tests with Gradle
run: |
./gradlew \
-PGITHUB_PUBLISH_TOKEN=${{ secrets.GITHUB_TOKEN }} \
${{ matrix.targets }}
shell: bash

Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ kotlin.code.style=official
# Gradle
org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M"
org.gradle.caching=true
org.gradle.configuration-cache=true
# Compose
org.jetbrains.compose.experimental.uikit.enabled=true
# Android
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package com.powersync.compile

import org.gradle.api.DefaultTask
import org.gradle.api.file.ProjectLayout
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.tasks.InputFile
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.OutputFile
import org.gradle.api.tasks.TaskAction
import org.gradle.work.DisableCachingByDefault
import javax.inject.Inject

@DisableCachingByDefault(because = "not worth caching")
abstract class CreateSqliteCInterop: DefaultTask() {
Expand All @@ -15,6 +18,9 @@ abstract class CreateSqliteCInterop: DefaultTask() {
@get:OutputFile
abstract val definitionFile: RegularFileProperty

@get:Inject
abstract val layout: ProjectLayout

@TaskAction
fun run() {
val archive = archiveFile.get().asFile
Expand All @@ -26,7 +32,7 @@ abstract class CreateSqliteCInterop: DefaultTask() {
linkerOpts.linux_x64 = -lpthread -ldl
linkerOpts.macos_x64 = -lpthread -ldl
staticLibraries=${archive.name}
libraryPaths=${parent.relativeTo(project.layout.projectDirectory.asFile.canonicalFile)}
libraryPaths=${parent.relativeTo(layout.projectDirectory.asFile.canonicalFile)}
""".trimIndent(),
)
}
Expand Down