Build and package the app for Android from the same Tauri 2 codebase, shipping an installable, sideloadable signed APK alongside the desktop binaries. Build / packaging - cfg-gate desktop-only tray / single-instance / hide-to-tray / exit-prevention in lib.rs behind #[cfg(desktop)]; move tauri-plugin-single-instance to a desktop-only target table so the library compiles for Android. - `cargo tauri android init` -> committed gen/android Gradle project; release signingConfigs read keystore.properties (gitignored, from CI secrets locally). - .github/workflows/release-android.yml: JDK 17 + Android SDK/NDK + rust targets, decode keystore from secrets, build --apk, upload to the same draft release. - vite.config.ts: es2020 build.target for Tauri builds (older-WebView safety). Runtime fixes (found via on-device testing) - External links: a real tap on `<a target="_blank">` makes the Android WebView fire onCreateWindow, which Tauri tries to satisfy via the shell plugin's open (no such binary on Android -> uncaught error, nothing opens). Strip target="_blank" from external anchors and route clicks through the opener plugin in the capture phase. (open-external.ts, main.tsx) - Boot black screen on old WebViews: crypto.randomUUID() (Chrome/WebView 92+) ran at module load and threw on WebView 91. Fall back to a manual RFC 4122 v4 built on getRandomValues. (uuid.ts; +4 regression tests, 509 -> 513) - File export on Android routes through the in-WebView blob download. (IS_MOBILE) Compatibility - minSdk 30 (Android 11+), targetSdk 36 (Android 16): covers the large majority of active devices with a modern, patched WebView + Google Play system updates. Release: bump manifests 0.28.0 -> 0.29.0; docs (README, FEATURES, PACKAGING, CHANGELOG). Verified on an Android 13 emulator (render, links, export). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
64 lines
1.8 KiB
JSON
64 lines
1.8 KiB
JSON
{
|
|
"name": "yt-desc-gen",
|
|
"version": "0.29.0",
|
|
"private": true,
|
|
"license": "Apache-2.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc && vite build",
|
|
"preview": "vite preview",
|
|
"test": "vitest",
|
|
"test:run": "vitest run",
|
|
"test:coverage": "vitest run --coverage",
|
|
"lint": "eslint src/",
|
|
"lint:fix": "eslint src/ --fix",
|
|
"knip": "knip",
|
|
"typecheck": "tsc --noEmit",
|
|
"format": "prettier --write \"src/**/*.{ts,tsx,json,css}\"",
|
|
"validate:locales": "tsx scripts/validate-locales.ts",
|
|
"generate:locale": "tsx scripts/generate-locale-template.ts",
|
|
"tauri": "tauri",
|
|
"tauri:dev": "tauri dev",
|
|
"tauri:build": "tauri build"
|
|
},
|
|
"dependencies": {
|
|
"@tauri-apps/api": "^2.11.0",
|
|
"@tauri-apps/plugin-dialog": "^2.0.0",
|
|
"@tauri-apps/plugin-fs": "^2.0.0",
|
|
"@tauri-apps/plugin-opener": "^2.0.0",
|
|
"@tauri-apps/plugin-shell": "^2.0.0",
|
|
"clsx": "^2.1.0",
|
|
"i18next": "^23.15.0",
|
|
"i18next-resources-to-backend": "^1.2.1",
|
|
"lucide-react": "^0.400.0",
|
|
"react": "^18.3.0",
|
|
"react-dom": "^18.3.0",
|
|
"react-hot-toast": "^2.4.0",
|
|
"react-i18next": "^15.0.0",
|
|
"react-router-dom": "^6.26.0",
|
|
"zustand": "^4.5.0"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^9.0.0",
|
|
"@testing-library/jest-dom": "^6.4.0",
|
|
"@testing-library/react": "^16.0.0",
|
|
"@types/react": "^18.3.0",
|
|
"@types/react-dom": "^18.3.0",
|
|
"@vitejs/plugin-react": "^5.2.0",
|
|
"autoprefixer": "^10.4.0",
|
|
"eslint": "^9.0.0",
|
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
"knip": "^6.14.1",
|
|
"postcss": "^8.5.14",
|
|
"prettier": "^3.3.0",
|
|
"prettier-plugin-tailwindcss": "^0.6.0",
|
|
"tailwindcss": "^3.4.0",
|
|
"tsx": "^4.22.4",
|
|
"typescript": "^5.5.0",
|
|
"typescript-eslint": "^8.0.0",
|
|
"vite": "^8.0.16",
|
|
"vitest": "^4.1.8"
|
|
}
|
|
}
|