Merge remote-tracking branch 'origin/v2' into feat/camera

feat/camera
Lucas Nogueira 2 years ago
commit 80a5dd478e
No known key found for this signature in database
GPG Key ID: 7C32FCA95C8C95D7

@ -0,0 +1,11 @@
[advisories]
ignore = [
# time 0.1
"RUSTSEC-2020-0071",
# needs sqlx 0.7 (still in alpha)
"RUSTSEC-2022-0090",
# wry needs kuchiki on Android
"RUSTSEC-2023-0019",
# atty is only used when the `colored` feature is enabled on tauri-plugin-log
"RUSTSEC-2021-0145"
]

@ -3,12 +3,12 @@
"pkgManagers": {
"javascript": {
"version": true,
"getPublishedVersion": "node ../../.scripts/covector/package-latest-version.js npm ${ pkgFile.pkg.name } ${ pkgFile.pkg.version }",
"getPublishedVersion": "node ../../.scripts/covector/package-latest-version.cjs npm ${ pkgFile.pkg.name } ${ pkgFile.pkg.version }",
"publish": ["pnpm build", "pnpm publish --access public --no-git-checks"]
},
"rust": {
"version": true,
"getPublishedVersion": "node ../../.scripts/covector/package-latest-version.js cargo ${ pkgFile.pkg.package.name } ${ pkgFile.pkg.package.version }",
"getPublishedVersion": "node ../../.scripts/covector/package-latest-version.cjs cargo ${ pkgFile.pkg.package.name } ${ pkgFile.pkg.package.version }",
"publish": [
{
"command": "cargo package --no-verify",
@ -33,85 +33,159 @@
}
},
"packages": {
"api-example": {
"path": "./examples/api/src-tauri",
"manager": "rust",
"publish": false,
"dependencies": [
"app",
"barcode-scanner",
"log-plugin",
"cli",
"clipboard-manager",
"dialog",
"fs",
"global-shortcut",
"http",
"notification",
"os",
"process",
"shell",
"updater",
"window"
]
},
"api-example-js": {
"path": "./examples/api",
"manager": "javascript",
"publish": false,
"dependencies": [
"app-js",
"barcode-scanner-js",
"log-js",
"cli-js",
"clipboard-manager-js",
"dialog-js",
"fs-js",
"global-shortcut-js",
"http-js",
"notification-js",
"os-js",
"process-js",
"shell-js",
"updater-js",
"window-js"
],
"postversion": "pnpm install --no-frozen-lockfile"
},
"deep-link-example-js": {
"path": "./plugins/deep-link/examples/app",
"manager": "javascript",
"publish": false,
"dependencies": ["deep-link-js"],
"postversion": "pnpm install --no-frozen-lockfile"
},
"app": {
"path": "./plugins/app",
"manager": "rust"
},
"app-js": {
"path": "./plugins/app",
"manager": "javascript"
},
"authenticator": {
"path": "./plugins/authenticator",
"manager": "rust-disabled"
"manager": "rust"
},
"authenticator-js": {
"path": "./plugins/authenticator",
"manager": "javascript-disabled"
"manager": "javascript"
},
"autostart": {
"path": "./plugins/autostart",
"manager": "rust-disabled"
"manager": "rust"
},
"autostart-js": {
"path": "./plugins/autostart",
"manager": "javascript-disabled"
"manager": "javascript"
},
"barcode-scanner": {
"path": "./plugins/barcode-scanner",
"manager": "rust"
},
"barcode-scanner-js": {
"path": "./plugins/barcode-scanner",
"manager": "javascript"
},
"cli": {
"path": "./plugins/cli",
"manager": "rust-disabled"
"manager": "rust"
},
"cli-js": {
"path": "./plugins/cli",
"manager": "javascript-disabled"
"manager": "javascript"
},
"clipboard": {
"path": "./plugins/clipboard",
"manager": "rust-disabled"
"clipboard-manager": {
"path": "./plugins/clipboard-manager",
"manager": "rust"
},
"clipboard-js": {
"path": "./plugins/clipboard",
"manager": "javascript-disabled"
"clipboard-manager-js": {
"path": "./plugins/clipboard-manager",
"manager": "javascript"
},
"dialog": {
"path": "./plugins/dialog",
"manager": "rust-disabled"
"deep-link": {
"path": "./plugins/deep-link",
"manager": "rust"
},
"dialog-js": {
"path": "./plugins/dialog",
"manager": "javascript-disabled"
"deep-link-js": {
"path": "./plugins/deep-link",
"manager": "javascript"
},
"fs": {
"path": "./plugins/fs",
"manager": "rust-disabled"
"manager": "rust"
},
"fs-js": {
"path": "./plugins/fs",
"manager": "javascript-disabled"
"manager": "javascript"
},
"fs-watch": {
"path": "./plugins/fs-watch",
"manager": "rust-disabled"
"dialog": {
"path": "./plugins/dialog",
"manager": "rust",
"dependencies": ["fs"]
},
"fs-watch-js": {
"path": "./plugins/fs-watch",
"manager": "javascript-disabled"
"dialog-js": {
"path": "./plugins/dialog",
"manager": "javascript"
},
"global-shortcut": {
"path": "./plugins/global-shortcut",
"manager": "rust-disabled"
"manager": "rust"
},
"global-shortcut-js": {
"path": "./plugins/global-shortcut",
"manager": "javascript-disabled"
"manager": "javascript"
},
"http": {
"path": "./plugins/http",
"manager": "rust-disabled"
"manager": "rust",
"dependencies": ["fs"]
},
"http-js": {
"path": "./plugins/http",
"manager": "javascript-disabled"
"manager": "javascript"
},
"localhost": {
@ -119,27 +193,37 @@
"manager": "rust"
},
"log": {
"log-plugin": {
"path": "./plugins/log",
"manager": "rust-disabled"
"manager": "rust"
},
"log-js": {
"path": "./plugins/log",
"manager": "javascript-disabled"
"manager": "javascript"
},
"notification": {
"path": "./plugins/notification",
"manager": "rust-disabled"
"manager": "rust"
},
"notification-js": {
"path": "./plugins/notification",
"manager": "javascript-disabled"
"manager": "javascript"
},
"os": {
"path": "./plugins/os",
"manager": "rust"
},
"os-js": {
"path": "./plugins/os",
"manager": "javascript"
},
"persisted-scope": {
"path": "./plugins/persisted-scope",
"manager": "rust"
"manager": "rust",
"dependencies": ["fs"]
},
"positioner": {
@ -148,66 +232,114 @@
},
"positioner-js": {
"path": "./plugins/positioner",
"manager": "javascript-disabled"
"manager": "javascript"
},
"process": {
"path": "./plugins/process",
"manager": "rust"
},
"process-js": {
"path": "./plugins/process",
"manager": "javascript"
},
"shell": {
"path": "./plugins/shell",
"manager": "rust-disabled"
"manager": "rust"
},
"shell-js": {
"path": "./plugins/shell",
"manager": "javascript-disabled"
"manager": "javascript"
},
"single-instance": {
"path": "./plugins/single-instance",
"manager": "rust-disabled"
"manager": "rust"
},
"sql": {
"path": "./plugins/sql",
"manager": "rust-disabled"
"manager": "rust",
"publish": [
{
"command": "cargo package --no-verify",
"dryRunCommand": true
},
{
"command": "echo '<details>\n<summary><em><h4>Cargo Publish</h4></em></summary>\n\n```'",
"dryRunCommand": true,
"pipe": true
},
{
"command": "cargo publish --features sqlite",
"dryRunCommand": "cargo publish --features sqlite --dry-run",
"pipe": true
},
{
"command": "echo '```\n\n</details>\n'",
"dryRunCommand": true,
"pipe": true
}
]
},
"sql-js": {
"path": "./plugins/sql",
"manager": "javascript-disabled"
"manager": "javascript"
},
"store": {
"path": "./plugins/store",
"manager": "rust-disabled"
"manager": "rust"
},
"store-js": {
"path": "./plugins/store",
"manager": "javascript-disabled"
"manager": "javascript"
},
"stronghold": {
"path": "./plugins/stronghold",
"manager": "rust-disabled"
"manager": "rust"
},
"stronghold-js": {
"path": "./plugins/stronghold",
"manager": "javascript-disabled"
"manager": "javascript"
},
"updater": {
"path": "./plugins/updater",
"manager": "rust"
},
"updater-js": {
"path": "./plugins/updater",
"manager": "javascript"
},
"upload": {
"path": "./plugins/upload",
"manager": "rust-disabled"
"manager": "rust"
},
"upload-js": {
"path": "./plugins/upload",
"manager": "javascript-disabled"
"manager": "javascript"
},
"websocket": {
"path": "./plugins/websocket",
"manager": "rust-disabled"
"manager": "rust"
},
"websocket-js": {
"path": "./plugins/websocket",
"manager": "javascript-disabled"
"manager": "javascript"
},
"window": {
"path": "./plugins/window",
"manager": "rust"
},
"window-js": {
"path": "./plugins/window",
"manager": "javascript"
},
"window-state": {
@ -216,7 +348,7 @@
},
"window-state-js": {
"path": "./plugins/window-state",
"manager": "javascript-disabled"
"manager": "javascript"
}
}
}

@ -0,0 +1,6 @@
---
"deep-link": major
"deep-link-js": major
---
Initial release.

@ -0,0 +1,5 @@
---
"dialog": "patch"
---
On non-Linux system, use `AsyncMessageDialog` instead of `MessageDialog`. [(tauri#7182)](https://github.com/tauri-apps/tauri/issues/7182)

@ -0,0 +1,5 @@
---
"window-js": "minor:feat"
---
Added the `maximizable`, `minimizable` and `closable` fields on `WindowOptions`.

@ -0,0 +1,6 @@
---
"window": "minor:feat"
"window-js": "minor:feat"
---
Added the `setMaximizable`, `setMinimizable`, `setClosable`, `isMaximizable`, `isMinimizable` and `isClosable` methods.

@ -0,0 +1,30 @@
---
"app": patch
"authenticator": patch
"autostart": patch
"cli": patch
"clipboard-manager": patch
"dialog": patch
"fs": patch
"global-shortcut": patch
"http": patch
"localhost": patch
"log-plugin": patch
"notification": patch
"os": patch
"persisted-scope": patch
"positioner": patch
"process": patch
"shell": patch
"single-instance": patch
"sql": patch
"store": patch
"stronghold": patch
"updater": patch
"upload": patch
"websocket": patch
"window": patch
"window-state": patch
---
Fixes docs.rs build by enabling the `tauri/dox` feature flag.

@ -0,0 +1,5 @@
---
"fs-js": patch
---
Fix `writeBinaryFile` crashing with `command 'write_binary_file' not found`

@ -0,0 +1,5 @@
---
"http-js": minor
---
Multipart requests are now handled in JavaScript by the `Request` JavaScript class so you just need to use a `FormData` body and not set the content-type header to `multipart/form-data`. `application/x-www-form-urlencoded` requests must be done manually.

@ -0,0 +1,6 @@
---
"http": minor
"http-js": minor
---
The http plugin has been rewritten from scratch and now only exposes a `fetch` function in Javascript and Re-exports `reqwest` crate in Rust. The new `fetch` method tries to be as close and compliant to the `fetch` Web API as possible.

@ -0,0 +1,5 @@
---
"http": patch
---
Remove `cmd` property which breaks invoke call.

@ -0,0 +1,5 @@
---
"http": patch
---
Improve response performance by using the new IPC streaming data.

@ -0,0 +1,5 @@
---
"notification": patch
---
Use `window.__TAURI_INVOKE__` instead of `window.__TAURI__` in init.js, fixes usage in apps without `withGlobalTauri` enabled.

@ -0,0 +1,5 @@
---
"notification": patch
---
Revert [7d71ad4e5](https://github.com/tauri-apps/plugins-workspace/commit/7d71ad4e587bcf47ea34645f5b226945e487b765) which added a default sound for notifications on Windows. This introduced inconsistency with other platforms that has silent notifications by default. In the upcoming releases, we will add support for modifying the notification sound across all platforms.

@ -0,0 +1,5 @@
---
"notification": patch
---
Play a default sound when showing a notification on Windows.

@ -0,0 +1,5 @@
---
"os-js": "patch"
---
Fix `macss -> macos` typo in `OsType` type.

@ -0,0 +1,12 @@
---
"os": minor
"os-js": minor
---
The os plugin is recieving a few changes to improve consistency and add new features:
- Renamed `Kind` enum to `OsType` and `kind()` function to `os_type()`.
- Added `family()`,`exe_extension()`, and `hostname()` functions and their equivalents for JS.
- Removed `tempdir()` function and its equivalent on JS, use `std::env::temp_dir` instead of `temp_dir` from `tauri::path::PathResolver::temp_dir` and `path.tempDir` on JS.
- Modified `platform()` implementation to return `windows` instead of `win32` and `macos` instead of `darwin` to align with Rust's `std::env::consts::OS`
- `EOL` const in JS has been modified into a function `eol()` fix import issues in frameworks like `next.js`

@ -0,0 +1,5 @@
---
"persisted-scope": patch
---
Split up fs and asset scopes. **This will reset the asset protocol scope once!**

@ -1,5 +0,0 @@
---
persisted-scope: patch
---
Recursively unescape saved patterns before allowing/forbidding them. This effectively prevents `.persisted-scope` files from blowing up, which caused Out-Of-Memory issues, while automatically fixing existing broken files seamlessly.

@ -0,0 +1,5 @@
---
"persisted-scope": patch
---
Fix usage of directory patterns by removing glob asterisks at the end before allowing/forbidding them. This was causing them to be escaped, and so undesirable paths were allowed/forbidden while polluting the `.persisted-scope` file.

@ -0,0 +1,5 @@
---
"positioner": patch
---
Change `system-tray` feature flag to `tray-icon`.

@ -0,0 +1,41 @@
{
"tag": "alpha",
"changes": [
".changes/deep-link-initial-release.md",
".changes/dialog-async-message-dialog.md",
".changes/disable-window-controls-api-options.md",
".changes/disable-window-controls-api.md",
".changes/fix-docs-build.md",
".changes/fs-wiret-binary-file.md",
".changes/http-multipart-refactor.md",
".changes/http-plugin-refactor.md",
".changes/http-remove-cmd-property.md",
".changes/http-response.md",
".changes/notification-init-script.md",
".changes/notification-revert-sound.md",
".changes/notification-sound.md",
".changes/os-OsType.md",
".changes/os-plugin-refactor.md",
".changes/persisted-scope-asset.md",
".changes/persisted-scope-glob.md",
".changes/positioner-tray-flag.md",
".changes/scanner-initial-release.md",
".changes/shell-command-apis.md",
".changes/shell-detached.md",
".changes/stronghold-arg-name.md",
".changes/stronghold-constructor.md",
".changes/tauri-alpha.11.md",
".changes/tauri-alpha.12.md",
".changes/updater-nsis-admin.md",
".changes/updater-nsis.md",
".changes/updater-plugin-refactor.md",
".changes/v2-alpha.md",
".changes/window-incognito.md",
".changes/window-is-focused.md",
".changes/window-plugin-refactor.md",
".changes/window-set-effects.md",
".changes/window-state-decorated.md",
".changes/window-state-promise.md",
".changes/window-tap-drag-region-detection.md"
]
}

@ -0,0 +1,6 @@
---
"barcode-scanner": major
"barcode-scanner-js": major
---
Initial release.

@ -0,0 +1,5 @@
---
"shell": "patch"
---
Added `Command::arg`, `Command::env` and changed `Command::new` input type.

@ -0,0 +1,5 @@
---
"shell": patch
---
Ensure the launched process is detached so it can out-live your tauri app and does not shutdown with it.

@ -0,0 +1,5 @@
---
"stronghold-js": patch
---
Change the argument name of the `Stronghold.remove` from `location` to `recordPath` to match the Stronghold command argument

@ -0,0 +1,5 @@
---
"stronghold-js": minor
---
Added `Stronghold.load` and removed its constructor.

@ -0,0 +1,53 @@
---
"app": patch
"app-js": patch
"authenticator": patch
"authenticator-js": patch
"autostart": patch
"autostart-js": patch
"cli": patch
"cli-js": patch
"clipboard-manager": patch
"clipboard-manager-js": patch
"dialog": patch
"dialog-js": patch
"fs": patch
"fs-js": patch
"global-shortcut": patch
"global-shortcut-js": patch
"http": patch
"http-js": patch
"localhost": patch
"log-plugin": patch
"log-js": patch
"notification": patch
"notification-js": patch
"os": patch
"os-js": patch
"persisted-scope": patch
"positioner": patch
"positioner-js": patch
"process": patch
"process-js": patch
"shell": patch
"shell-js": patch
"single-instance": patch
"sql": patch
"sql-js": patch
"store": patch
"store-js": patch
"stronghold": patch
"stronghold-js": patch
"updater": patch
"updater-js": patch
"upload": patch
"upload-js": patch
"websocket": patch
"websocket-js": patch
"window": patch
"window-js": patch
"window-state": patch
"window-state-js": patch
---
Update to alpha.11.

@ -0,0 +1,30 @@
---
"app": patch
"authenticator": patch
"autostart": patch
"cli": patch
"clipboard-manager": patch
"dialog": patch
"fs": patch
"global-shortcut": patch
"http": patch
"localhost": patch
"log-plugin": patch
"notification": patch
"os": patch
"persisted-scope": patch
"positioner": patch
"process": patch
"shell": patch
"single-instance": patch
"sql": patch
"store": patch
"stronghold": patch
"updater": patch
"upload": patch
"websocket": patch
"window": patch
"window-state": patch
---
Update to alpha.12.

@ -0,0 +1,5 @@
---
"updater": "patch"
---
On Windows, fix NSIS installers requiring administrator rights failing to be launched by updater.

@ -0,0 +1,5 @@
---
"updater": patch
---
Implement passive mode on NSIS and automatically restart after NSIS update.

@ -0,0 +1,6 @@
---
"updater": minor
"updater-js": minor
---
The updater plugin is recieving a few changes to improve consistency and ergonomics of the Rust and JS APIs

@ -0,0 +1,53 @@
---
"app": major
"app-js": major
"authenticator": major
"authenticator-js": major
"autostart": major
"autostart-js": major
"cli": major
"cli-js": major
"clipboard-manager": major
"clipboard-manager-js": major
"dialog": major
"dialog-js": major
"fs": major
"fs-js": major
"global-shortcut": major
"global-shortcut-js": major
"http": major
"http-js": major
"localhost": major
"log-plugin": major
"log-js": major
"notification": major
"notification-js": major
"os": major
"os-js": major
"persisted-scope": major
"positioner": major
"positioner-js": major
"process": major
"process-js": major
"shell": major
"shell-js": major
"single-instance": major
"sql": major
"sql-js": major
"store": major
"store-js": major
"stronghold": major
"stronghold-js": major
"updater": major
"updater-js": major
"upload": major
"upload-js": major
"websocket": major
"websocket-js": major
"window": major
"window-js": major
"window-state": major
"window-state-js": major
---
First v2 alpha release!

@ -0,0 +1,5 @@
---
"window-js": "minor"
---
Add `incognito` window configuration option

@ -0,0 +1,6 @@
---
"window": "minor:feat"
"window-js": "minor:feat"
---
Add `WebviewWindow.is_focused` and `WebviewWindow.getFocusedWindow` getters.

@ -0,0 +1,10 @@
---
"window": "patch"
"window-js": "patch"
---
The window plugin is recieving a few changes to improve consistency and add new features:
- Removed `appWindow` variable from JS module, use `getCurrent` or `Window.getCurrent`.
- Removed `WindowManager`, `WebviewWindow` and `WebviewHandle` types and merged them into one `Window` type that matches the name of the rust window type.
- Added `Window.getCurrent` and `Window.getAll` which is a convenient method for `getCurrent` and `getAll` functions.

@ -0,0 +1,6 @@
---
"window": "patch"
"window-js": "patch"
---
Added the `setEffects` and `clearEffects` API.

@ -0,0 +1,5 @@
---
"window-state": "patch"
---
Correctly set decoration state if no saved state xists

@ -0,0 +1,5 @@
---
"window-state-js": "patch"
---
Correctly propagate the promise inside `saveWindowState`, `restoreState` and `restoreStateCurrent` so callers can choose to `await` them.

@ -0,0 +1,5 @@
---
"window": "patch"
---
On macOS, fixed tapping on custom title bar doesn't maximize the window.

@ -2,3 +2,5 @@ target
node_modules
dist
dist-js
api-iife.js
init.js

@ -1,4 +1,7 @@
#!/bin/bash
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
## Environment used by this script:
#

@ -1,3 +1,7 @@
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: Audit JavaScript
on:

@ -1,3 +1,7 @@
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: Audit Rust
on:

@ -0,0 +1,155 @@
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: check generated files
on:
pull_request:
paths:
- ".github/workflows/check-generated-files.yml"
- "**/guest-js/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
app:
- .github/workflows/check-generated-files.yml
- plugins/app/guest-js/**
- plugins/app/src/api-iife.js
authenticator:
- .github/workflows/check-generated-files.yml
- plugins/authenticator/guest-js/**
- plugins/authenticator/src/api-iife.js
autostart:
- .github/workflows/check-generated-files.yml
- plugins/autostart/guest-js/**
- plugins/autostart/src/api-iife.js
cli:
- .github/workflows/check-generated-files.yml
- plugins/cli/guest-js/**
- plugins/cli/src/api-iife.js
clipboard-manager:
- .github/workflows/check-generated-files.yml
- plugins/clipboard-manager/guest-js/**
- plugins/clipboard-manager/src/api-iife.js
dialog:
- .github/workflows/check-generated-files.yml
- plugins/dialog/guest-js/**
- plugins/dialog/src/api-iife.js
fs:
- .github/workflows/check-generated-files.yml
- plugins/fs/guest-js/**
- plugins/fs/src/api-iife.js
global-shortcut:
- .github/workflows/check-generated-files.yml
- plugins/global-shortcut/guest-js/**
- plugins/global-shortcut/src/api-iife.js
http:
- .github/workflows/check-generated-files.yml
- plugins/http/guest-js/**
- plugins/http/src/api-iife.js
log:
- .github/workflows/check-generated-files.yml
- plugins/log/guest-js/**
- plugins/log/src/api-iife.js
notification:
- .github/workflows/check-generated-files.yml
- plugins/notification/guest-js/**
- plugins/notification/src/api-iife.js
os:
- .github/workflows/check-generated-files.yml
- plugins/os/guest-js/**
- plugins/os/src/api-iife.js
positioner:
- .github/workflows/check-generated-files.yml
- plugins/positioner/guest-js/**
- plugins/positioner/src/api-iife.js
process:
- .github/workflows/check-generated-files.yml
- plugins/process/guest-js/**
- plugins/process/src/api-iife.js
shell:
- .github/workflows/check-generated-files.yml
- plugins/shell/guest-js/**
- plugins/shell/src/api-iife.js
sql:
- .github/workflows/check-generated-files.yml
- plugins/sql/guest-js/**
- plugins/sql/src/api-iife.js
store:
- .github/workflows/check-generated-files.yml
- plugins/store/guest-js/**
- plugins/store/src/api-iife.js
stronghold:
- .github/workflows/check-generated-files.yml
- plugins/stronghold/guest-js/**
- plugins/stronghold/src/api-iife.js
updater:
- .github/workflows/check-generated-files.yml
- plugins/updater/guest-js/**
- plugins/updater/src/api-iife.js
upload:
- .github/workflows/check-generated-files.yml
- plugins/upload/guest-js/**
- plugins/upload/src/api-iife.js
websocket:
- .github/workflows/check-generated-files.yml
- plugins/websocket/guest-js/**
- plugins/websocket/src/api-iife.js
window:
- .github/workflows/check-generated-files.yml
- plugins/window/guest-js/**
- plugins/window/src/api-iife.js
window-state:
- .github/workflows/check-generated-files.yml
- plugins/window-state/guest-js/**
- plugins/window-state/src/api-iife.js
test:
needs: changes
if: ${{ needs.changes.outputs.packages != '[]' && needs.changes.outputs.packages != '' }}
strategy:
fail-fast: false
matrix:
package: ${{ fromJSON(needs.changes.outputs.packages) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
with:
version: 7.x.x
run_install: true
- name: build api
working-directory: plugins/${{ matrix.package }}
run: pnpm install && pnpm build
- name: check diff
run: |
./.scripts/ci/has-diff.sh

@ -0,0 +1,28 @@
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: check license header
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
list-files: shell
filters: |
added:
- added: '**'
- name: check header license on new files
if: ${{ steps.filter.outputs.added == 'true' }}
run: node .scripts/ci/check-license-header.js ${{ steps.filter.outputs.added_files }}

@ -1,3 +1,7 @@
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: covector status
on: [pull_request]
@ -10,7 +14,7 @@ jobs:
with:
fetch-depth: 0 # required for use of git history
- name: covector status
uses: jbolda/covector/packages/action@covector-v0.8
uses: jbolda/covector/packages/action@covector-v0
id: covector
with:
command: "status"

@ -0,0 +1,68 @@
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: version or publish
on:
push:
branches:
- v2
jobs:
version-or-publish:
runs-on: ubuntu-latest
timeout-minutes: 65
outputs:
change: ${{ steps.covector.outputs.change }}
commandRan: ${{ steps.covector.outputs.commandRan }}
successfulPublish: ${{ steps.covector.outputs.successfulPublish }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # required for use of git history
- uses: actions/setup-node@v3
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v2
with:
version: 7.x.x
run_install: true
- name: install webkit2gtk and libudev for [authenticator]
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libudev-dev
- name: cargo login
run: cargo login ${{ secrets.ORG_CRATES_IO_TOKEN }}
- name: git config
run: |
git config --global user.name "${{ github.event.pusher.name }}"
git config --global user.email "${{ github.event.pusher.email }}"
- name: covector version or publish (publish when no change files present)
uses: jbolda/covector/packages/action@covector-v0
id: covector
env:
NODE_AUTH_TOKEN: ${{ secrets.ORG_NPM_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: "version-or-publish"
createRelease: true
- name: Create Pull Request With Versions Bumped
id: cpr
uses: tauri-apps/create-pull-request@v3
if: steps.covector.outputs.commandRan == 'version'
with:
title: "Publish New Versions (v2)"
commit-message: "publish new versions"
labels: "version updates"
branch: "release-v2"
body: ${{ steps.covector.outputs.change }}

@ -1,3 +1,7 @@
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: version or publish
on:
@ -29,6 +33,11 @@ jobs:
version: 7.x.x
run_install: true
- name: install webkit2gtk and libudev for [authenticator]
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libudev-dev
- name: cargo login
run: cargo login ${{ secrets.ORG_CRATES_IO_TOKEN }}
@ -38,7 +47,7 @@ jobs:
git config --global user.email "${{ github.event.pusher.email }}"
- name: covector version or publish (publish when no change files present)
uses: jbolda/covector/packages/action@covector-v0.8
uses: jbolda/covector/packages/action@covector-v0
id: covector
env:
NODE_AUTH_TOKEN: ${{ secrets.ORG_NPM_TOKEN }}

@ -0,0 +1,54 @@
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: integration tests
on:
push:
branches:
- v1
- v2
paths:
- ".github/workflows/integration-tests.yml"
- "plugins/updater/src/**"
pull_request:
branches:
- v1
- v2
paths:
- ".github/workflows/integration-tests.yml"
- "plugins/updater/src/**"
jobs:
run-integration-tests:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: install stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: install Linux dependencies
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev libfuse2
- uses: Swatinem/rust-cache@v2
- name: install Tauri CLI
run: cargo install tauri-cli --git https://github.com/tauri-apps/tauri --branch dev
- name: run integration tests
run: cargo test --test '*' -- --ignored

@ -1,3 +1,7 @@
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: Lint JavaScript
on:

@ -1,3 +1,7 @@
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: Lint Rust
on:
@ -8,6 +12,7 @@ on:
paths:
- ".github/workflows/lint-rust.yml"
- "plugins/*/src/**"
- "!plugins/*/src/api-iife.js"
- "**/Cargo.toml"
pull_request:
branches:
@ -16,6 +21,7 @@ on:
paths:
- ".github/workflows/lint-rust.yml"
- "plugins/*/src/**"
- "!plugins/*/src/api-iife.js"
- "**/Cargo.toml"
concurrency:
@ -23,10 +29,108 @@ concurrency:
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
packages: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
tauri-plugin-app:
- .github/workflows/lint-rust.yml
- plugins/app/**
tauri-plugin-authenticator:
- .github/workflows/lint-rust.yml
- plugins/authenticator/**
tauri-plugin-autostart:
- .github/workflows/lint-rust.yml
- plugins/autostart/**
tauri-plugin-cli:
- .github/workflows/lint-rust.yml
- plugins/cli/**
tauri-plugin-clipboard-manager:
- .github/workflows/lint-rust.yml
- plugins/clipboard-manager/**
tauri-plugin-dialog:
- .github/workflows/lint-rust.yml
- plugins/dialog/**
- plugins/fs/**
tauri-plugin-fs:
- .github/workflows/lint-rust.yml
- plugins/fs/**
tauri-plugin-global-shortcut:
- .github/workflows/lint-rust.yml
- plugins/global-shortcut/**
tauri-plugin-http:
- .github/workflows/lint-rust.yml
- plugins/http/**
- plugins/fs/**
tauri-plugin-localhost:
- .github/workflows/lint-rust.yml
- plugins/localhost/**
tauri-plugin-log:
- .github/workflows/lint-rust.yml
- plugins/log/**
tauri-plugin-notification:
- .github/workflows/lint-rust.yml
- plugins/notification/**
tauri-plugin-os:
- .github/workflows/lint-rust.yml
- plugins/os/**
tauri-plugin-persisted-scope:
- .github/workflows/lint-rust.yml
- plugins/persisted-scope/**
- plugins/fs/**
tauri-plugin-positioner:
- .github/workflows/lint-rust.yml
- plugins/positioner/**
tauri-plugin-process:
- .github/workflows/lint-rust.yml
- plugins/process/**
tauri-plugin-shell:
- .github/workflows/lint-rust.yml
- plugins/shell/**
tauri-plugin-single-instance:
- .github/workflows/lint-rust.yml
- plugins/single-instance/**
tauri-plugin-sql:
- .github/workflows/lint-rust.yml
- plugins/sql/**
tauri-plugin-store:
- .github/workflows/lint-rust.yml
- plugins/store/**
tauri-plugin-stronghold:
- .github/workflows/lint-rust.yml
- plugins/stronghold/**
tauri-plugin-updater:
- .github/workflows/lint-rust.yml
- plugins/updater/**
tauri-plugin-upload:
- .github/workflows/lint-rust.yml
- plugins/upload/**
tauri-plugin-websocket:
- .github/workflows/lint-rust.yml
- plugins/websocket/**
tauri-plugin-window:
- .github/workflows/lint-rust.yml
- plugins/window/**
tauri-plugin-window-state:
- .github/workflows/lint-rust.yml
- plugins/window-state/**
clippy:
needs: changes
if: ${{ needs.changes.outputs.packages != '[]' && needs.changes.outputs.packages != '' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: ${{ fromJSON(needs.changes.outputs.packages) }}
steps:
- uses: actions/checkout@v3
@ -43,17 +147,25 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: clippy
run: cargo clippy --workspace --exclude 'tauri-plugin-sql' --all-targets --all-features -- -D warnings
- name: create dummy dist
working-directory: examples/api
run: mkdir dist
- name: clippy ${{ matrix.package }}
if: matrix.package != 'tauri-plugin-sql'
run: cargo clippy --package ${{ matrix.package }} --all-targets -- -D warnings
- name: clippy sql:sqlite
run: cargo clippy --package 'tauri-plugin-sql' --all-targets --features sqlite -- -D warnings
- name: clippy ${{ matrix.package }} --all-features
if: ${{ !contains(fromJSON('["tauri-plugin-http", "tauri-plugin-upload", "tauri-plugin-updater", "tauri-plugin-websocket", "tauri-plugin-sql"]'), matrix.package) }}
run: cargo clippy --package ${{ matrix.package }} --all-targets --all-features -- -D warnings
- name: clippy sql:mysql
run: cargo clippy --package 'tauri-plugin-sql' --all-targets --features mysql -- -D warnings
- name: clippy ${{ matrix.package }} mysql
if: matrix.package == 'tauri-plugin-sql'
run: cargo clippy --package ${{ matrix.package }} --all-targets --no-default-features --features mysql -- -D warnings
- name: clippy sql:postgres
run: cargo clippy --package 'tauri-plugin-sql' --all-targets --features postgres -- -D warnings
- name: clippy ${{ matrix.package }} postgres
if: matrix.package == 'tauri-plugin-sql'
run: cargo clippy --package ${{ matrix.package }} --all-targets --no-default-features --features postgres -- -D warnings
fmt:
runs-on: ubuntu-latest

@ -1,55 +0,0 @@
name: Check MSRV
on:
push:
branches:
- v1
- v2
paths:
- ".github/workflows/msrv-check.yml"
- "plugins/*/src/**"
- "**/Cargo.toml"
- "**/Cargo.lock"
pull_request:
branches:
- v1
- v2
paths:
- ".github/workflows/msrv-check.yml"
- "plugins/*/src/**"
- "**/Cargo.toml"
- "**/Cargo.lock"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
msrv:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: install webkit2gtk and libudev for [authenticator]
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libudev-dev
- uses: dtolnay/rust-toolchain@1.64.0
- uses: Swatinem/rust-cache@v2
- name: build
run: cargo build --workspace --exclude 'tauri-plugin-sql' --all-targets --all-features
- name: build sql:sqlite
run: cargo build --package 'tauri-plugin-sql' --all-targets --features sqlite
- name: build sql:mysql
run: cargo build --package 'tauri-plugin-sql' --all-targets --features mysql
- name: build sql:postgres
run: cargo build --package 'tauri-plugin-sql' --all-targets --features postgres

@ -1,3 +1,7 @@
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: Sync
on:

@ -0,0 +1,231 @@
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: Test Rust
on:
push:
branches:
- v1
- v2
paths:
- ".github/workflows/test-rust.yml"
- "plugins/*/src/**"
- "!plugins/*/src/api-iife.js"
- "**/Cargo.toml"
- "**/Cargo.lock"
pull_request:
branches:
- v1
- v2
paths:
- ".github/workflows/test-rust.yml"
- "plugins/*/src/**"
- "!plugins/*/src/api-iife.js"
- "**/Cargo.toml"
- "**/Cargo.lock"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
packages: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
tauri-plugin-app:
- .github/workflows/test-rust.yml
- plugins/app/**
tauri-plugin-authenticator:
- .github/workflows/test-rust.yml
- plugins/authenticator/**
tauri-plugin-autostart:
- .github/workflows/test-rust.yml
- plugins/autostart/**
tauri-plugin-cli:
- .github/workflows/test-rust.yml
- plugins/cli/**
tauri-plugin-clipboard-manager:
- .github/workflows/test-rust.yml
- plugins/clipboard-manager/**
tauri-plugin-dialog:
- .github/workflows/test-rust.yml
- plugins/dialog/**
- plugins/fs/**
tauri-plugin-fs:
- .github/workflows/test-rust.yml
- plugins/fs/**
tauri-plugin-global-shortcut:
- .github/workflows/test-rust.yml
- plugins/global-shortcut/**
tauri-plugin-http:
- .github/workflows/test-rust.yml
- plugins/http/**
- plugins/fs/**
tauri-plugin-localhost:
- .github/workflows/test-rust.yml
- plugins/localhost/**
tauri-plugin-log:
- .github/workflows/test-rust.yml
- plugins/log/**
tauri-plugin-notification:
- .github/workflows/test-rust.yml
- plugins/notification/**
tauri-plugin-os:
- .github/workflows/test-rust.yml
- plugins/os/**
tauri-plugin-persisted-scope:
- .github/workflows/test-rust.yml
- plugins/persisted-scope/**
- plugins/fs/**
tauri-plugin-positioner:
- .github/workflows/test-rust.yml
- plugins/positioner/**
tauri-plugin-process:
- .github/workflows/test-rust.yml
- plugins/process/**
tauri-plugin-shell:
- .github/workflows/test-rust.yml
- plugins/shell/**
tauri-plugin-single-instance:
- .github/workflows/test-rust.yml
- plugins/single-instance/**
tauri-plugin-sql:
- .github/workflows/test-rust.yml
- plugins/sql/**
tauri-plugin-store:
- .github/workflows/test-rust.yml
- plugins/store/**
tauri-plugin-stronghold:
- .github/workflows/test-rust.yml
- plugins/stronghold/**
tauri-plugin-updater:
- .github/workflows/test-rust.yml
- plugins/updater/**
tauri-plugin-upload:
- .github/workflows/test-rust.yml
- plugins/upload/**
tauri-plugin-websocket:
- .github/workflows/test-rust.yml
- plugins/websocket/**
tauri-plugin-window:
- .github/workflows/test-rust.yml
- plugins/window/**
tauri-plugin-window-state:
- .github/workflows/test-rust.yml
- plugins/window-state/**
test:
needs: changes
if: ${{ needs.changes.outputs.packages != '[]' && needs.changes.outputs.packages != '' }}
strategy:
fail-fast: false
matrix:
package: ${{ fromJSON(needs.changes.outputs.packages) }}
platform:
- {
target: x86_64-pc-windows-msvc,
os: windows-latest,
cross: false,
command: "test",
}
- {
target: x86_64-unknown-linux-gnu,
os: ubuntu-latest,
cross: false,
command: "test",
}
- {
target: x86_64-apple-darwin,
os: macos-latest,
cross: false,
command: "test",
}
- {
target: aarch64-apple-ios,
os: macos-latest,
cross: false,
command: "build",
}
- {
target: aarch64-linux-android,
os: ubuntu-latest,
cross: true,
command: "build",
}
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v3
- name: install webkit2gtk and libudev for [authenticator]
if: contains(matrix.platform.target, 'unknown-linux')
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libudev-dev
- name: install openssl
if: ${{ matrix.platform.os == 'windows-latest' && matrix.package == 'tauri-plugin-authenticator' }}
run: |
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
vcpkg install openssl:x64-windows-static-md
- uses: dtolnay/rust-toolchain@1.65.0
with:
targets: ${{ matrix.platform.target }}
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.package }}
- name: create dummy dist
working-directory: examples/api
run: mkdir dist
- name: Downgrade crates with MSRV conflict
# The --precise flag can only be used once per invocation.
run: |
cargo update -p time@0.3.24 --precise 0.3.23
- name: test ${{ matrix.package }}
if: matrix.package != 'tauri-plugin-sql'
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.platform.cross }}
command: ${{ matrix.platform.command }}
args: --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets
- name: test ${{ matrix.package }} --all-features
if: ${{ !contains(fromJSON('["tauri-plugin-http", "tauri-plugin-upload", "tauri-plugin-updater", "tauri-plugin-websocket", "tauri-plugin-sql"]'), matrix.package) }}
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.platform.cross }}
command: ${{ matrix.platform.command }}
args: --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --all-features
- name: test ${{ matrix.package }} mysql
if: matrix.package == 'tauri-plugin-sql'
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.platform.cross }}
command: ${{ matrix.platform.command }}
args: --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features mysql
- name: test ${{ matrix.package }} postgres
if: matrix.package == 'tauri-plugin-sql'
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.platform.cross }}
command: ${{ matrix.platform.command }}
args: --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features postgres

@ -0,0 +1 @@
auto-install-peers=true

@ -1,5 +1,10 @@
target
node_modules
dist
dist-js
pnpm-lock.yaml
Cargo.lock
Cargo.lock
.build
build
api-iife.js
intermediates/

@ -0,0 +1,124 @@
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
import fs from "fs";
import path from "path";
import readline from "readline";
const header = `Copyright 2019-2023 Tauri Programme within The Commons Conservancy
SPDX-License-Identifier: Apache-2.0
SPDX-License-Identifier: MIT`;
const ignoredLicense = "// Copyright 2021 Jonas Kruckenberg";
const extensions = [".rs", ".js", ".ts", ".yml", ".swift", ".kt"];
const ignore = [
"target",
"templates",
"node_modules",
"gen",
"dist",
"dist-js",
".svelte-kit",
"api-iife.js",
".build",
];
async function checkFile(file) {
if (
extensions.some((e) => file.endsWith(e)) &&
!ignore.some((i) => file.endsWith(i))
) {
const fileStream = fs.createReadStream(file);
const rl = readline.createInterface({
input: fileStream,
crlfDelay: Infinity,
});
let contents = ``;
let i = 0;
for await (let line of rl) {
// ignore empty lines, allow shebang, swift-tools-version and bundler license
if (
line.length === 0 ||
line.startsWith("#!") ||
line.startsWith("// swift-tools-version:") ||
line === ignoredLicense
) {
continue;
}
// strip comment marker
if (line.startsWith("// ")) {
line = line.substring(3);
} else if (line.startsWith("# ")) {
line = line.substring(2);
}
contents += line;
if (++i === 3) {
break;
}
contents += "\n";
}
if (contents !== header) {
return true;
}
}
return false;
}
async function check(src) {
const missingHeader = [];
for (const entry of fs.readdirSync(src, {
withFileTypes: true,
})) {
const p = path.join(src, entry.name);
if (entry.isSymbolicLink() || ignore.includes(entry.name)) {
continue;
}
if (entry.isDirectory()) {
const missing = await check(p);
missingHeader.push(...missing);
} else {
const isMissing = await checkFile(p);
if (isMissing) {
missingHeader.push(p);
}
}
}
return missingHeader;
}
const [_bin, _script, ...files] = process.argv;
if (files.length > 0) {
async function run() {
const missing = [];
for (const f of files) {
const isMissing = await checkFile(f);
if (isMissing) {
missing.push(f);
}
}
if (missing.length > 0) {
console.log(missing.join("\n"));
process.exit(1);
}
}
run();
} else {
check(path.resolve(new URL(import.meta.url).pathname, "../../..")).then(
(missing) => {
if (missing.length > 0) {
console.log(missing.join("\n"));
process.exit(1);
}
},
);
}

@ -0,0 +1,9 @@
#!/bin/bash
if git diff --quiet --ignore-submodules HEAD
then
echo "working directory is clean"
else
echo "found diff"
exit 1
fi

@ -44,11 +44,15 @@ https.get(url, options, (response) => {
response.on("end", function () {
const data = JSON.parse(chunks.join(""));
if (kind === "cargo") {
const versions = data.versions.filter((v) => v.num.startsWith(target));
console.log(versions.length ? versions[0].num : "0.0.0");
if (data.versions) {
const versions = data.versions.filter((v) => v.num.startsWith(target));
console.log(versions.length ? versions[0].num : "0.0.0");
} else {
console.log("0.0.0");
}
} else if (kind === "npm") {
const versions = Object.keys(data.versions).filter((v) =>
v.startsWith(target)
const versions = Object.keys(data.versions || {}).filter((v) =>
v.startsWith(target),
);
console.log(versions[versions.length - 1] || "0.0.0");
}

3005
Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -1,13 +1,12 @@
[workspace]
members = ["plugins/*", "examples/*/src-tauri"]
exclude = ["plugins/fs", "plugins/http", "examples/api/src-tauri"]
members = ["plugins/*", "plugins/*/tests/*", "plugins/*/examples/*/src-tauri", "examples/*/src-tauri"]
resolver = "2"
[workspace.dependencies]
serde = { version = "1", features = ["derive"] }
log = "0.4"
tauri = "2.0.0-alpha.8"
tauri-build = "2.0.0-alpha.4"
tauri = "2.0.0-alpha.12"
tauri-build = "2.0.0-alpha.8"
serde_json = "1"
thiserror = "1"
@ -15,5 +14,12 @@ thiserror = "1"
edition = "2021"
authors = [ "Tauri Programme within The Commons Conservancy" ]
license = "Apache-2.0 OR MIT"
rust-version = "1.64"
exclude = ["/examples"]
rust-version = "1.65"
# default to small, optimized release binaries
[profile.release]
panic = "abort"
codegen-units = 1
lto = true
incremental = false
opt-level = "s"

@ -1,21 +1,19 @@
## Plugins Found Here
| | | Win | Mac | Lin | iOS | And |
| ------------------------------------------ | --------------------------------------------------------- | --- | --- | --- | --- | --- |
| [authenticator](plugins/authenticator) | Interface with hardware security keys. | ✅ | ✅ | ✅ | ? | ? |
| [autostart](plugins/autostart) | Automatically launch your app at system startup. | ✅ | ✅ | ✅ | ? | ? |
| [fs-extra](plugins/fs-extra) | File system methods that aren't included in the core API. | ✅ | ✅ | ✅ | ? | ? |
| [fs-watch](plugins/fs-watch) | Watch the filesystem for changes. | ✅ | ✅ | ✅ | ? | ? |
| [localhost](plugins/localhost) | Use a localhost server in production apps. | ✅ | ✅ | ✅ | ? | ? |
| [log](plugins/log) | Configurable logging. | ✅ | ✅ | ✅ | ✅ | ✅ |
| [persisted-scope](plugins/persisted-scope) | Persist runtime scope changes on the filesystem. | ✅ | ✅ | ✅ | ? | ? |
| [positioner](plugins/positioner) | Move windows to common locations. | ✅ | ✅ | ✅ | ? | ? |
| [single-instance](plugins/single-instance) | Ensure a single instance of your tauri app is running. | ✅ | ? | ✅ | ? | ? |
| [sql](plugins/sql) | Interface with SQL databases. | ✅ | ✅ | ✅ | ? | ? |
| [store](plugins/store) | Persistent key value storage. | ✅ | ✅ | ✅ | ? | ? |
| [stronghold](plugins/stronghold) | Encrypted, secure database. | ✅ | ✅ | ✅ | ? | ? |
| [upload](plugins/upload) | Tauri plugin for file uploads through HTTP. | ✅ | ✅ | ✅ | ? | ? |
| [websocket](plugins/websocket) | Open a WebSocket connection using a Rust client in JS. | ✅ | ✅ | ✅ | ? | ? |
| [window-state](plugins/window-state) | Persist window sizes and positions. | ✅ | ✅ | ✅ | ? | ? |
| | | Win | Mac | Lin | iOS | And |
| ------------------------------------------ | ------------------------------------------------------ | --- | --- | --- | --- | --- |
| [authenticator](plugins/authenticator) | Interface with hardware security keys. | ✅ | ✅ | ✅ | ? | ? |
| [autostart](plugins/autostart) | Automatically launch your app at system startup. | ✅ | ✅ | ✅ | ? | ? |
| [localhost](plugins/localhost) | Use a localhost server in production apps. | ✅ | ✅ | ✅ | ? | ? |
| [log](plugins/log) | Configurable logging. | ✅ | ✅ | ✅ | ✅ | ✅ |
| [persisted-scope](plugins/persisted-scope) | Persist runtime scope changes on the filesystem. | ✅ | ✅ | ✅ | ? | ? |
| [positioner](plugins/positioner) | Move windows to common locations. | ✅ | ✅ | ✅ | ? | ? |
| [single-instance](plugins/single-instance) | Ensure a single instance of your tauri app is running. | ✅ | ? | ✅ | ? | ? |
| [sql](plugins/sql) | Interface with SQL databases. | ✅ | ✅ | ✅ | ? | ? |
| [store](plugins/store) | Persistent key value storage. | ✅ | ✅ | ✅ | ? | ? |
| [stronghold](plugins/stronghold) | Encrypted, secure database. | ✅ | ✅ | ✅ | ? | ? |
| [upload](plugins/upload) | Tauri plugin for file uploads through HTTP. | ✅ | ✅ | ✅ | ? | ? |
| [websocket](plugins/websocket) | Open a WebSocket connection using a Rust client in JS. | ✅ | ✅ | ✅ | ? | ? |
| [window-state](plugins/window-state) | Persist window sizes and positions. | ✅ | ✅ | ✅ | ? | ? |
_This repo and all plugins require a Rust version of at least **1.64**_
_This repo and all plugins require a Rust version of at least **1.65**_

@ -1,4 +1,7 @@
#!/usr/bin/env bash
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
export ICONS_VOLUME="$(realpath icons)"
export DIST_VOLUME="$(realpath dist)"

@ -0,0 +1,37 @@
# Changelog
## \[2.0.0-alpha.3]
### Dependencies
- Upgraded to `barcode-scanner-js@2.0.0-alpha.0`
## \[2.0.0-alpha.2]
### Dependencies
- Upgraded to `os-js@2.0.0-alpha.2`
## \[2.0.0-alpha.1]
### Dependencies
- Upgraded to `window-js@2.0.0-alpha.1`
- Upgraded to `fs-js@2.0.0-alpha.1`
- Upgraded to `http-js@2.0.0-alpha.1`
- Upgraded to `os-js@2.0.0-alpha.1`
- Upgraded to `app-js@2.0.0-alpha.1`
- Upgraded to `cli-js@2.0.0-alpha.1`
- Upgraded to `dialog-js@2.0.0-alpha.1`
- Upgraded to `global-shortcut-js@2.0.0-alpha.1`
- Upgraded to `log-js@2.0.0-alpha.1`
- Upgraded to `notification-js@2.0.0-alpha.1`
- Upgraded to `process-js@2.0.0-alpha.1`
- Upgraded to `shell-js@2.0.0-alpha.1`
- Upgraded to `updater-js@2.0.0-alpha.1`
## \[2.0.0-alpha.0]
### Dependencies
- Plugins v2 alpha.

@ -1,8 +1,11 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en" theme="dark">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, viewport-fit=cover"
/>
<title>Svelte + Vite App</title>
</head>

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />

@ -1,6 +1,7 @@
{
"name": "svelte-app",
"version": "1.0.0",
"private": true,
"version": "2.0.0-alpha.3",
"type": "module",
"scripts": {
"dev": "vite --clearScreen false",
@ -8,26 +9,33 @@
"serve": "vite preview"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.3",
"@tauri-apps/cli": "2.0.0-alpha.8",
"@zerodevx/svelte-json-view": "0.2.1",
"tauri-plugin-camera-api": "0.0.0",
"tauri-plugin-cli-api": "0.0.0",
"tauri-plugin-clipboard-api": "0.0.0",
"tauri-plugin-dialog-api": "0.0.0",
"tauri-plugin-fs-api": "0.0.0",
"tauri-plugin-global-shortcut-api": "0.0.0",
"tauri-plugin-http-api": "0.0.0",
"tauri-plugin-notification-api": "0.0.0",
"tauri-plugin-shell-api": "0.0.0"
"@tauri-apps/api": "2.0.0-alpha.8",
"@tauri-apps/plugin-app": "2.0.0-alpha.1",
"@tauri-apps/plugin-barcode-scanner": "2.0.0-alpha.0",
"@tauri-apps/plugin-camera": "1.0.0",
"@tauri-apps/plugin-cli": "2.0.0-alpha.1",
"@tauri-apps/plugin-clipboard-manager": "2.0.0-alpha.1",
"@tauri-apps/plugin-dialog": "2.0.0-alpha.1",
"@tauri-apps/plugin-fs": "2.0.0-alpha.1",
"@tauri-apps/plugin-global-shortcut": "2.0.0-alpha.1",
"@tauri-apps/plugin-http": "2.0.0-alpha.1",
"@tauri-apps/plugin-notification": "2.0.0-alpha.1",
"@tauri-apps/plugin-os": "2.0.0-alpha.2",
"@tauri-apps/plugin-process": "2.0.0-alpha.1",
"@tauri-apps/plugin-shell": "2.0.0-alpha.1",
"@tauri-apps/plugin-updater": "2.0.0-alpha.1",
"@tauri-apps/plugin-window": "2.0.0-alpha.1",
"@zerodevx/svelte-json-view": "1.0.5"
},
"devDependencies": {
"@iconify-json/codicon": "^1.1.10",
"@iconify-json/ph": "^1.1.1",
"@sveltejs/vite-plugin-svelte": "^1.0.1",
"internal-ip": "^7.0.0",
"svelte": "^3.49.0",
"unocss": "^0.39.3",
"vite": "^3.0.9"
"@iconify-json/codicon": "^1.1.26",
"@iconify-json/ph": "^1.1.5",
"@sveltejs/vite-plugin-svelte": "^2.4.1",
"@tauri-apps/cli": "2.0.0-alpha.14",
"@unocss/extractor-svelte": "^0.53.1",
"internal-ip": "^8.0.0",
"svelte": "^3.59.1",
"unocss": "^0.53.1",
"vite": "^4.3.9"
}
}

@ -0,0 +1,62 @@
# Changelog
## \[2.0.0-alpha.5]
### Dependencies
- Upgraded to `barcode-scanner@2.0.0-alpha.0`
## \[2.0.0-alpha.4]
### Dependencies
- Upgraded to `http@2.0.0-alpha.3`
- Upgraded to `app@2.0.0-alpha.2`
- Upgraded to `cli@2.0.0-alpha.2`
- Upgraded to `clipboard-manager@2.0.0-alpha.2`
- Upgraded to `dialog@2.0.0-alpha.2`
- Upgraded to `fs@2.0.0-alpha.2`
- Upgraded to `global-shortcut@2.0.0-alpha.2`
- Upgraded to `log-plugin@2.0.0-alpha.2`
- Upgraded to `notification@2.0.0-alpha.3`
- Upgraded to `os@2.0.0-alpha.2`
- Upgraded to `process@2.0.0-alpha.2`
- Upgraded to `shell@2.0.0-alpha.2`
- Upgraded to `updater@2.0.0-alpha.2`
- Upgraded to `window@2.0.0-alpha.2`
## \[2.0.0-alpha.3]
### Dependencies
- Upgraded to `http@2.0.0-alpha.2`
## \[2.0.0-alpha.2]
### Dependencies
- Upgraded to `dialog@2.0.0-alpha.1`
- Upgraded to `window@2.0.0-alpha.1`
- Upgraded to `app@2.0.0-alpha.1`
- Upgraded to `cli@2.0.0-alpha.1`
- Upgraded to `fs@2.0.0-alpha.1`
- Upgraded to `global-shortcut@2.0.0-alpha.1`
- Upgraded to `http@2.0.0-alpha.1`
- Upgraded to `log-plugin@2.0.0-alpha.1`
- Upgraded to `notification@2.0.0-alpha.2`
- Upgraded to `os@2.0.0-alpha.1`
- Upgraded to `process@2.0.0-alpha.1`
- Upgraded to `shell@2.0.0-alpha.1`
- Upgraded to `updater@2.0.0-alpha.1`
## \[2.0.0-alpha.1]
### Dependencies
- Updated to latest `notification`
## \[2.0.0-alpha.0]
### Dependencies
- Plugins v2 alpha.

File diff suppressed because it is too large Load Diff

@ -1,63 +1,57 @@
[package]
name = "api"
version = "0.1.0"
publish = false
version = "2.0.0-alpha.5"
description = "An example Tauri Application showcasing the api"
edition = "2021"
rust-version = "1.64"
rust-version = { workspace = true }
license = "Apache-2.0 OR MIT"
[lib]
crate-type = ["staticlib", "cdylib", "rlib"]
crate-type = [ "staticlib", "cdylib", "rlib" ]
[build-dependencies]
tauri-build = { version = "2.0.0-alpha.4", features = ["codegen", "isolation"] }
tauri-build = { workspace = true, features = [ "codegen", "isolation" ] }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = [ "derive" ] }
serde_json = { workspace = true }
serde = { workspace = true }
tiny_http = "0.11"
log = "0.4"
tauri-plugin-log = { path = "../../../plugins/log" }
tauri-plugin-fs = { path = "../../../plugins/fs" }
tauri-plugin-clipboard = { path = "../../../plugins/clipboard" }
tauri-plugin-dialog = { path = "../../../plugins/dialog" }
tauri-plugin-http = { path = "../../../plugins/http", features = [ "http-multipart" ] }
tauri-plugin-notification = { path = "../../../plugins/notification", features = [ "windows7-compat" ] }
tauri-plugin-shell = { path = "../../../plugins/shell" }
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
tauri-plugin-camera = { path = "../../../plugins/camera" }
[patch.crates-io]
tauri = { git = "https://github.com/tauri-apps/tauri", branch = "next" }
tauri-build = { git = "https://github.com/tauri-apps/tauri", branch = "next" }
[dependencies.tauri]
version = "2.0.0-alpha.8"
features = [
"api-all",
log = { workspace = true }
tauri-plugin-app = { path = "../../../plugins/app", version = "2.0.0-alpha.2" }
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-alpha.2" }
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-alpha.2" }
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0-alpha.2" }
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-alpha.2" }
tauri-plugin-http = { path = "../../../plugins/http", features = [ "multipart" ], version = "2.0.0-alpha.3" }
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-alpha.3", features = [ "windows7-compat" ] }
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-alpha.2" }
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-alpha.2" }
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-alpha.2" }
tauri-plugin-window = { path = "../../../plugins/window", version = "2.0.0-alpha.2", features = [ "devtools", "icon-ico", "icon-png" ] }
[dependencies.tauri]
workspace = true
features = [
"icon-ico",
"icon-png",
"isolation",
"macos-private-api",
"system-tray",
"updater"
"tray-icon",
"protocol-asset"
]
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
tauri-plugin-cli = { path = "../../../plugins/cli" }
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut" }
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.0.0-alpha.2" }
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0-alpha.2" }
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-alpha.2" }
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-alpha.0" }
tauri-plugin-camera = { path = "../../../plugins/camera/", version = "1.0.0" }
[target."cfg(target_os = \"windows\")".dependencies]
window-shadows = "0.2"
[features]
custom-protocol = [ "tauri/custom-protocol" ]
# default to small, optimized release binaries
[profile.release]
panic = "abort"
codegen-units = 1
lto = true
incremental = false
opt-level = "s"

@ -3,10 +3,10 @@
// SPDX-License-Identifier: MIT
fn main() {
let mut codegen = tauri_build::CodegenContext::new();
if !cfg!(feature = "custom-protocol") {
codegen = codegen.dev();
}
codegen.build();
tauri_build::build();
let mut codegen = tauri_build::CodegenContext::new();
if !cfg!(feature = "custom-protocol") {
codegen = codegen.dev();
}
codegen.build();
tauri_build::build();
}

@ -13,6 +13,7 @@ build
.externalNativeBuild
.cxx
local.properties
key.properties
/.tauri
/tauri.settings.gradle

@ -1,113 +0,0 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("rustPlugin")
}
android {
compileSdk = 33
defaultConfig {
manifestPlaceholders["usesCleartextTraffic"] = "false"
applicationId = "com.tauri.api"
minSdk = 24
targetSdk = 33
versionCode = 1
versionName = "1.0"
}
sourceSets.getByName("main") {
// Vulkan validation layers
val ndkHome = System.getenv("NDK_HOME")
jniLibs.srcDir("${ndkHome}/sources/third_party/vulkan/src/build-android/jniLibs")
}
buildTypes {
getByName("debug") {
manifestPlaceholders["usesCleartextTraffic"] = "true"
isDebuggable = true
isJniDebuggable = true
isMinifyEnabled = false
packagingOptions { jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so")
jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so")
jniLibs.keepDebugSymbols.add("*/x86/*.so")
jniLibs.keepDebugSymbols.add("*/x86_64/*.so")
}
}
getByName("release") {
isMinifyEnabled = true
val proguards = fileTree(".") {
include("*.pro")
}
proguardFiles(*proguards.toList().toTypedArray())
}
}
flavorDimensions.add("abi")
productFlavors {
create("universal") {
dimension = "abi"
ndk {
abiFilters += (findProperty("abiList") as? String)?.split(",") ?: listOf( "arm64-v8a", "armeabi-v7a", "x86", "x86_64",
)
}
}
create("arm64") {
dimension = "abi"
ndk {
abiFilters += listOf("arm64-v8a")
}
}
create("arm") {
dimension = "abi"
ndk {
abiFilters += listOf("armeabi-v7a")
}
}
create("x86") {
dimension = "abi"
ndk {
abiFilters += listOf("x86")
}
}
create("x86_64") {
dimension = "abi"
ndk {
abiFilters += listOf("x86_64")
}
}
}
assetPacks += mutableSetOf()
namespace = "com.tauri.api"
}
rust {
rootDirRel = "../../../../"
targets = (findProperty("targetList") as? String)?.split(",") ?: listOf("aarch64", "armv7", "i686", "x86_64")
arches = (findProperty("archList") as? String)?.split(",") ?: listOf("arm64", "arm", "x86", "x86_64")
}
dependencies {
implementation("androidx.webkit:webkit:1.5.0")
implementation("androidx.appcompat:appcompat:1.5.1")
implementation("com.google.android.material:material:1.7.0")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.4")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
implementation(project(":tauri-android"))
}
apply(from = "tauri.build.gradle.kts")
afterEvaluate {
android.applicationVariants.all {
tasks["mergeUniversalReleaseJniLibFolders"].dependsOn(tasks["rustBuildRelease"])
tasks["mergeUniversalDebugJniLibFolders"].dependsOn(tasks["rustBuildDebug"])
if (findProperty("targetList") == null) {
productFlavors.filter{ it.name != "universal" }.forEach { _ ->
val archAndBuildType = name.capitalize()
tasks["merge${archAndBuildType}JniLibFolders"].dependsOn(tasks["rustBuild${archAndBuildType}"])
}
}
}
}

@ -1,7 +0,0 @@
package com.tauri.api
import app.tauri.plugin.PluginManager
class MainActivity : TauriActivity() {
var pluginManager: PluginManager = PluginManager(this)
}

@ -1,16 +0,0 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/black</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_200</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>

@ -1,16 +0,0 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>

@ -1,59 +0,0 @@
package com.tauri
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException
import org.gradle.api.Plugin
import org.gradle.api.Project
import java.io.File
import java.util.*
const val TASK_GROUP = "rust"
open class Config {
var rootDirRel: String? = null
var targets: List<String>? = null
var arches: List<String>? = null
}
open class RustPlugin : Plugin<Project> {
private lateinit var config: Config
override fun apply(project: Project) {
config = project.extensions.create("rust", Config::class.java)
project.afterEvaluate {
if (config.targets == null) {
throw GradleException("targets cannot be null")
}
if (config.arches == null) {
throw GradleException("arches cannot be null")
}
for (profile in listOf("debug", "release")) {
val profileCapitalized = profile.capitalize(Locale.ROOT)
val buildTask = project.tasks.maybeCreate(
"rustBuild$profileCapitalized",
DefaultTask::class.java
).apply {
group = TASK_GROUP
description = "Build dynamic library in $profile mode for all targets"
}
for (targetPair in config.targets!!.withIndex()) {
val targetName = targetPair.value
val targetArch = config.arches!![targetPair.index]
val targetArchCapitalized = targetArch.capitalize(Locale.ROOT)
val targetBuildTask = project.tasks.maybeCreate(
"rustBuild$targetArchCapitalized$profileCapitalized",
BuildTask::class.java
).apply {
group = TASK_GROUP
description = "Build dynamic library in $profile mode for $targetArch"
rootDirRel = config.rootDirRel?.let { File(it) }
target = targetName
release = profile == "release"
}
buildTask.dependsOn(targetBuildTask)
project.tasks.findByName("preBuild")?.mustRunAfter(targetBuildTask)
}
}
}
}
}

@ -1,4 +1,5 @@
/src/main/java/com/tauri/api/generated
/src/main/jniLibs/**/*.so
/src/main/assets/tauri.conf.json
/tauri.build.gradle.kts
/proguard-tauri.pro

@ -0,0 +1,57 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("rust")
}
android {
compileSdk = 33
namespace = "com.tauri.api"
defaultConfig {
manifestPlaceholders["usesCleartextTraffic"] = "false"
applicationId = "com.tauri.api"
minSdk = 24
targetSdk = 33
versionCode = 1
versionName = "1.0"
}
buildTypes {
getByName("debug") {
manifestPlaceholders["usesCleartextTraffic"] = "true"
isDebuggable = true
isJniDebuggable = true
isMinifyEnabled = false
packaging { jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so")
jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so")
jniLibs.keepDebugSymbols.add("*/x86/*.so")
jniLibs.keepDebugSymbols.add("*/x86_64/*.so")
}
}
getByName("release") {
isMinifyEnabled = true
proguardFiles(
*fileTree(".") { include("**/*.pro") }
.plus(getDefaultProguardFile("proguard-android-optimize.txt"))
.toList().toTypedArray()
)
}
}
kotlinOptions {
jvmTarget = "1.8"
}
}
rust {
rootDirRel = "../../../"
}
dependencies {
implementation("androidx.webkit:webkit:1.6.1")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.8.0")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.4")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
}
apply(from = "tauri.build.gradle.kts")

@ -14,7 +14,6 @@
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

@ -0,0 +1,3 @@
package com.tauri.api
class MainActivity : TauriActivity()

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save