Skip to content
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
5 changes: 5 additions & 0 deletions .changeset/breezy-carrots-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@powersync/capacitor': patch
---

[Android] Fixed missing CMakeLists file error.
11 changes: 10 additions & 1 deletion .github/workflows/test-isolated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ jobs:
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "temurin"

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4

- uses: pnpm/action-setup@v2
name: Install pnpm
Expand Down
1 change: 0 additions & 1 deletion demos/example-capacitor/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ android {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.debug
}
}
}
Expand Down
Binary file not shown.
9 changes: 8 additions & 1 deletion demos/example-capacitor/capacitor.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@
}
},
"android": {
"loggingBehavior": "production"
"loggingBehavior": "production",
"buildOptions": {
"releaseType": "APK",
"keystorePath": "debug-isolated.keystore",
"keystorePassword": "android",
"keystoreAlias": "androiddebugkey",
"keystoreAliasPassword": "android"
}
},
"ios": {
"loggingBehavior": "production"
Expand Down
4 changes: 2 additions & 2 deletions demos/example-capacitor/ios/App/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ PODS:
- CapacitorSplashScreen (7.0.3):
- Capacitor
- powersync-sqlite-core (0.4.8)
- PowersyncCapacitor (0.0.1):
- PowersyncCapacitor (0.1.0):
- Capacitor
- powersync-sqlite-core (~> 0.4.6)
- SQLCipher (~> 4.0)
Expand Down Expand Up @@ -51,7 +51,7 @@ SPEC CHECKSUMS:
CapacitorCordova: 435121e81a2df4d0034f0fb11fcefab5104cfdb5
CapacitorSplashScreen: d06ae8804808e9f649a08e7bb7f283c77b688084
powersync-sqlite-core: f48d06a7a9e6f73fee5bbc74da542466be2bb06f
PowersyncCapacitor: d7dcf7f15e24b512571dc87f545855f936ef9537
PowersyncCapacitor: 9c39e1aec5125bdea55fa61e8277e4a3b16853d2
SQLCipher: eb79c64049cb002b4e9fcb30edb7979bf4706dfc
ZIPFoundation: dfd3d681c4053ff7e2f7350bc4e53b5dba3f5351

Expand Down
4 changes: 4 additions & 0 deletions demos/example-capacitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"sync": "npx cap sync",
"ios": "pnpm build && pnpm sync && npx cap run ios",
"android": "pnpm build && pnpm sync && npx cap run android",
"test:build": "pnpm build && npx cap sync && npx cap build android",
"start": "vite",
"build": "vite build",
"preview": "vite preview"
Expand All @@ -35,6 +36,9 @@
"devDependencies": {
"@capacitor/cli": "^7.4.3",
"@swc/core": "~1.6.0",
"@mui/material": "^5.15.12",
"@emotion/react": "11.11.4",
"@emotion/styled": "11.11.5",
"@types/node": "^20.12.12",
"@types/react": "^18.3.2",
"@types/react-dom": "^18.3.0",
Expand Down
6 changes: 1 addition & 5 deletions demos/example-capacitor/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,5 @@
"resolveJsonModule": true,
"jsx": "preserve"
},
"references": [
{
"path": "../../packages/web"
}
]
"references": []
}
23 changes: 0 additions & 23 deletions packages/capacitor/android/CMakeLists.txt

This file was deleted.

6 changes: 0 additions & 6 deletions packages/capacitor/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}

buildFeatures {
prefab true
}
Expand Down
12 changes: 0 additions & 12 deletions packages/capacitor/android/src/main/cpp/powersync_capacitor_jni.c

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package com.powersync.capacitor;

public class PowerSync {
static {
System.loadLibrary("powersync_capacitor");
}

public static native int registerPowersync();
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public class PowerSyncPlugin extends Plugin {
@PluginMethod
public void registerCore(PluginCall call) {
JSObject ret = new JSObject();
ret.put("responseCode", implementation.registerPowersync());
// For Android we don't statically register the library, so we always return 0
ret.put("responseCode", 0);
call.resolve(ret);
}
}
1 change: 1 addition & 0 deletions packages/capacitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"files": [
"android/src/main/",
"android/build.gradle",
"android/proguard-rules.pro",
"dist/",
"ios/Sources",
"ios/Tests",
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.