From f2726b61af27113ee1059943185980c770e86775 Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 30 Oct 2026 16:47:17 +0100 Subject: [PATCH] feat: android build --- README.md | 7 +- src-tauri/.gitignore | 2 + src-tauri/gen/android/.editorconfig | 12 - src-tauri/gen/android/.gitignore | 20 - src-tauri/gen/android/app/.gitignore | 6 - src-tauri/gen/android/app/build.gradle.kts | 37 +- src-tauri/gen/android/app/proguard-rules.pro | 21 - .../android/app/src/main/AndroidManifest.xml | 1 + .../com/lucas/thomann_dsp_app/MainActivity.kt | 11 - .../lucas/thomann_dsp_app/generated/Ipc.kt | 25 + .../lucas/thomann_dsp_app/generated/Logger.kt | 89 +++ .../generated/PermissionHelper.kt | 117 ++++ .../lucas/thomann_dsp_app/generated/Rust.kt | 46 ++ .../generated/RustWebChromeClient.kt | 519 ++++++++++++++ .../thomann_dsp_app/generated/RustWebView.kt | 98 +++ .../generated/RustWebViewClient.kt | 103 +++ .../generated/TauriActivity.kt | 60 ++ .../thomann_dsp_app/generated/WryActivity.kt | 199 ++++++ .../generated/proguard-wry.pro | 37 + .../arm64-v8a/libthomann_dsp_app_lib.so | 1 + .../armeabi-v7a/libthomann_dsp_app_lib.so | 1 + .../jniLibs/x86/libthomann_dsp_app_lib.so | 1 + .../jniLibs/x86_64/libthomann_dsp_app_lib.so | 1 + .../drawable-v24/ic_launcher_foreground.xml | 30 - .../res/drawable/ic_launcher_background.xml | 170 ----- .../app/src/main/res/layout/activity_main.xml | 18 - .../res/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../mipmap-anydpi-v26/ic_launcher_round.xml | 5 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 3524 -> 3199 bytes .../mipmap-hdpi/ic_launcher_foreground.png | Bin 14102 -> 16956 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 3524 -> 3753 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 3377 -> 3033 bytes .../mipmap-mdpi/ic_launcher_foreground.png | Bin 9081 -> 10015 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 3377 -> 3608 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 7971 -> 8051 bytes .../mipmap-xhdpi/ic_launcher_foreground.png | Bin 18900 -> 25197 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 7971 -> 9031 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 12392 -> 13887 bytes .../mipmap-xxhdpi/ic_launcher_foreground.png | Bin 29506 -> 45048 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 12392 -> 16037 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 16751 -> 20376 bytes .../mipmap-xxxhdpi/ic_launcher_foreground.png | Bin 40510 -> 70307 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 16751 -> 23244 bytes .../res/values/ic_launcher_background.xml | 4 + .../gen/android/app/tauri.build.gradle.kts | 7 + src-tauri/gen/android/app/tauri.properties | 3 + .../reports/problems/problems-report.html | 663 ++++++++++++++++++ .../executionHistory/executionHistory.bin | Bin 0 -> 53769 bytes .../executionHistory/executionHistory.lock | Bin 0 -> 17 bytes .../buildOutputCleanup.lock | Bin 0 -> 17 bytes .../buildOutputCleanup/cache.properties | 2 + .../buildOutputCleanup/outputFiles.bin | Bin 0 -> 18929 bytes .../buildSrc/.gradle/file-system.probe | Bin 0 -> 8 bytes .../kotlin/main/BuildTask$runTauriCli$1.class | Bin 0 -> 2956 bytes .../build/classes/kotlin/main/BuildTask.class | Bin 0 -> 4419 bytes .../build/classes/kotlin/main/Config.class | Bin 0 -> 1185 bytes .../main/META-INF/buildSrc.kotlin_module | Bin 0 -> 42 bytes .../main/RustPlugin$apply$1$1$1$1$1.class | Bin 0 -> 1878 bytes .../main/RustPlugin$apply$1$1$1$1.class | Bin 0 -> 1764 bytes .../main/RustPlugin$apply$1$1$1$2$1$1.class | Bin 0 -> 1912 bytes .../main/RustPlugin$apply$1$1$1$2$1.class | Bin 0 -> 1833 bytes .../kotlin/main/RustPlugin$apply$1$1$1.class | Bin 0 -> 3748 bytes .../kotlin/main/RustPlugin$apply$1$1.class | Bin 0 -> 2107 bytes .../kotlin/main/RustPlugin$apply$1$2.class | Bin 0 -> 6786 bytes ...$apply$lambda$0$$inlined$configure$1.class | Bin 0 -> 1102 bytes ...nlined$sam$i$org_gradle_api_Action$0.class | Bin 0 -> 1076 bytes .../classes/kotlin/main/RustPlugin.class | Bin 0 -> 4772 bytes .../classes/kotlin/main/RustPluginKt.class | Bin 0 -> 466 bytes .../caches-jvm/inputs/source-to-output.tab | Bin 0 -> 4096 bytes .../inputs/source-to-output.tab.keystream | Bin 0 -> 4096 bytes .../inputs/source-to-output.tab.keystream.len | Bin 0 -> 8 bytes .../inputs/source-to-output.tab.len | Bin 0 -> 8 bytes .../inputs/source-to-output.tab.values.at | Bin 0 -> 1691 bytes .../caches-jvm/inputs/source-to-output.tab_i | Bin 0 -> 32768 bytes .../inputs/source-to-output.tab_i.len | Bin 0 -> 8 bytes .../jvm/kotlin/class-attributes.tab | Bin 0 -> 4096 bytes .../jvm/kotlin/class-attributes.tab.keystream | Bin 0 -> 4096 bytes .../kotlin/class-attributes.tab.keystream.len | Bin 0 -> 8 bytes .../jvm/kotlin/class-attributes.tab.len | Bin 0 -> 8 bytes .../jvm/kotlin/class-attributes.tab.values.at | Bin 0 -> 58 bytes .../jvm/kotlin/class-attributes.tab_i | Bin 0 -> 32768 bytes .../jvm/kotlin/class-attributes.tab_i.len | Bin 0 -> 8 bytes .../jvm/kotlin/class-fq-name-to-source.tab | Bin 0 -> 4096 bytes .../class-fq-name-to-source.tab.keystream | Bin 0 -> 4096 bytes .../class-fq-name-to-source.tab.keystream.len | Bin 0 -> 8 bytes .../kotlin/class-fq-name-to-source.tab.len | Bin 0 -> 8 bytes .../class-fq-name-to-source.tab.values.at | Bin 0 -> 425 bytes .../jvm/kotlin/class-fq-name-to-source.tab_i | Bin 0 -> 32768 bytes .../kotlin/class-fq-name-to-source.tab_i.len | Bin 0 -> 8 bytes .../caches-jvm/jvm/kotlin/constants.tab | Bin 0 -> 4096 bytes .../jvm/kotlin/constants.tab.keystream | Bin 0 -> 4096 bytes .../jvm/kotlin/constants.tab.keystream.len | Bin 0 -> 8 bytes .../caches-jvm/jvm/kotlin/constants.tab.len | Bin 0 -> 8 bytes .../jvm/kotlin/constants.tab.values.at | Bin 0 -> 87 bytes .../caches-jvm/jvm/kotlin/constants.tab_i | Bin 0 -> 32768 bytes .../caches-jvm/jvm/kotlin/constants.tab_i.len | Bin 0 -> 8 bytes .../jvm/kotlin/internal-name-to-source.tab | Bin 0 -> 4096 bytes .../internal-name-to-source.tab.keystream | Bin 0 -> 4096 bytes .../internal-name-to-source.tab.keystream.len | Bin 0 -> 8 bytes .../kotlin/internal-name-to-source.tab.len | Bin 0 -> 8 bytes .../internal-name-to-source.tab.values.at | Bin 0 -> 1809 bytes .../jvm/kotlin/internal-name-to-source.tab_i | Bin 0 -> 32768 bytes .../kotlin/internal-name-to-source.tab_i.len | Bin 0 -> 8 bytes .../caches-jvm/jvm/kotlin/package-parts.tab | Bin 0 -> 4096 bytes .../jvm/kotlin/package-parts.tab.keystream | Bin 0 -> 4096 bytes .../kotlin/package-parts.tab.keystream.len | Bin 0 -> 8 bytes .../jvm/kotlin/package-parts.tab.len | Bin 0 -> 8 bytes .../jvm/kotlin/package-parts.tab.values.at | Bin 0 -> 52 bytes .../caches-jvm/jvm/kotlin/package-parts.tab_i | Bin 0 -> 32768 bytes .../jvm/kotlin/package-parts.tab_i.len | Bin 0 -> 8 bytes .../cacheable/caches-jvm/jvm/kotlin/proto.tab | Bin 0 -> 4096 bytes .../caches-jvm/jvm/kotlin/proto.tab.keystream | Bin 0 -> 4096 bytes .../jvm/kotlin/proto.tab.keystream.len | Bin 0 -> 8 bytes .../caches-jvm/jvm/kotlin/proto.tab.len | Bin 0 -> 8 bytes .../caches-jvm/jvm/kotlin/proto.tab.values.at | Bin 0 -> 1091 bytes .../caches-jvm/jvm/kotlin/proto.tab_i | Bin 0 -> 32768 bytes .../caches-jvm/jvm/kotlin/proto.tab_i.len | Bin 0 -> 8 bytes .../jvm/kotlin/source-to-classes.tab | Bin 0 -> 4096 bytes .../kotlin/source-to-classes.tab.keystream | Bin 0 -> 4096 bytes .../source-to-classes.tab.keystream.len | Bin 0 -> 8 bytes .../jvm/kotlin/source-to-classes.tab.len | Bin 0 -> 8 bytes .../kotlin/source-to-classes.tab.values.at | Bin 0 -> 814 bytes .../jvm/kotlin/source-to-classes.tab_i | Bin 0 -> 32768 bytes .../jvm/kotlin/source-to-classes.tab_i.len | Bin 0 -> 8 bytes .../caches-jvm/jvm/kotlin/subtypes.tab | Bin 0 -> 4096 bytes .../jvm/kotlin/subtypes.tab.keystream | Bin 0 -> 4096 bytes .../jvm/kotlin/subtypes.tab.keystream.len | Bin 0 -> 8 bytes .../caches-jvm/jvm/kotlin/subtypes.tab.len | Bin 0 -> 8 bytes .../jvm/kotlin/subtypes.tab.values.at | Bin 0 -> 74 bytes .../caches-jvm/jvm/kotlin/subtypes.tab_i | Bin 0 -> 32768 bytes .../caches-jvm/jvm/kotlin/subtypes.tab_i.len | Bin 0 -> 8 bytes .../caches-jvm/jvm/kotlin/supertypes.tab | Bin 0 -> 4096 bytes .../jvm/kotlin/supertypes.tab.keystream | Bin 0 -> 4096 bytes .../jvm/kotlin/supertypes.tab.keystream.len | Bin 0 -> 8 bytes .../caches-jvm/jvm/kotlin/supertypes.tab.len | Bin 0 -> 8 bytes .../jvm/kotlin/supertypes.tab.values.at | Bin 0 -> 102 bytes .../caches-jvm/jvm/kotlin/supertypes.tab_i | Bin 0 -> 32768 bytes .../jvm/kotlin/supertypes.tab_i.len | Bin 0 -> 8 bytes .../cacheable/caches-jvm/lookups/counters.tab | 2 + .../caches-jvm/lookups/file-to-id.tab | Bin 0 -> 4096 bytes .../lookups/file-to-id.tab.keystream | Bin 0 -> 4096 bytes .../lookups/file-to-id.tab.keystream.len | Bin 0 -> 8 bytes .../caches-jvm/lookups/file-to-id.tab.len | Bin 0 -> 8 bytes .../lookups/file-to-id.tab.values.at | Bin 0 -> 61 bytes .../caches-jvm/lookups/file-to-id.tab_i | Bin 0 -> 32768 bytes .../caches-jvm/lookups/file-to-id.tab_i.len | Bin 0 -> 8 bytes .../caches-jvm/lookups/id-to-file.tab | Bin 0 -> 4096 bytes .../lookups/id-to-file.tab.keystream | Bin 0 -> 4096 bytes .../lookups/id-to-file.tab.keystream.len | Bin 0 -> 8 bytes .../caches-jvm/lookups/id-to-file.tab.len | Bin 0 -> 8 bytes .../lookups/id-to-file.tab.values.at | Bin 0 -> 174 bytes .../caches-jvm/lookups/id-to-file.tab_i | Bin 0 -> 32768 bytes .../caches-jvm/lookups/id-to-file.tab_i.len | Bin 0 -> 8 bytes .../cacheable/caches-jvm/lookups/lookups.tab | Bin 0 -> 8192 bytes .../caches-jvm/lookups/lookups.tab.keystream | Bin 0 -> 20480 bytes .../lookups/lookups.tab.keystream.len | Bin 0 -> 8 bytes .../caches-jvm/lookups/lookups.tab.len | Bin 0 -> 8 bytes .../caches-jvm/lookups/lookups.tab.values.at | Bin 0 -> 3409 bytes .../caches-jvm/lookups/lookups.tab_i | Bin 0 -> 32768 bytes .../caches-jvm/lookups/lookups.tab_i.len | Bin 0 -> 8 bytes .../compileKotlin/cacheable/last-build.bin | Bin 0 -> 18 bytes .../shrunk-classpath-snapshot.bin | Bin 0 -> 33455 bytes .../local-state/build-history.bin | Bin 0 -> 31 bytes .../android/buildSrc/build/libs/buildSrc.jar | Bin 0 -> 20734 bytes .../build/pluginDescriptors/rust.properties | 1 + .../META-INF/gradle-plugins/rust.properties | 1 + .../buildSrc/build/tmp/jar/MANIFEST.MF | 2 + src-tauri/gen/android/keystore.properties | 3 + src-tauri/gen/android/tauri.settings.gradle | 5 + src-tauri/icons/128x128.png | Bin 9579 -> 12555 bytes src-tauri/icons/128x128@2x.png | Bin 24541 -> 33014 bytes src-tauri/icons/32x32.png | Bin 1595 -> 1993 bytes src-tauri/icons/64x64.png | Bin 3824 -> 4944 bytes src-tauri/icons/Square107x107Logo.png | Bin 7432 -> 9888 bytes src-tauri/icons/Square142x142Logo.png | Bin 11141 -> 14132 bytes src-tauri/icons/Square150x150Logo.png | Bin 11805 -> 15258 bytes src-tauri/icons/Square284x284Logo.png | Bin 28144 -> 37135 bytes src-tauri/icons/Square30x30Logo.png | Bin 1448 -> 1873 bytes src-tauri/icons/Square310x310Logo.png | Bin 31458 -> 42133 bytes src-tauri/icons/Square44x44Logo.png | Bin 2457 -> 2989 bytes src-tauri/icons/Square71x71Logo.png | Bin 4367 -> 5837 bytes src-tauri/icons/Square89x89Logo.png | Bin 5956 -> 7848 bytes src-tauri/icons/StoreLogo.png | Bin 2838 -> 3587 bytes src-tauri/icons/icon.icns | Bin 349454 -> 432122 bytes src-tauri/icons/icon.ico | Bin 35911 -> 46548 bytes src-tauri/icons/icon.png | Bin 62377 -> 62078 bytes src-tauri/icons/ios/AppIcon-20x20@1x.png | Bin 834 -> 1004 bytes src-tauri/icons/ios/AppIcon-20x20@2x-1.png | Bin 2104 -> 2545 bytes src-tauri/icons/ios/AppIcon-20x20@2x.png | Bin 2104 -> 2545 bytes src-tauri/icons/ios/AppIcon-20x20@3x.png | Bin 3619 -> 4378 bytes src-tauri/icons/ios/AppIcon-29x29@1x.png | Bin 1392 -> 1706 bytes src-tauri/icons/ios/AppIcon-29x29@2x-1.png | Bin 3388 -> 4340 bytes src-tauri/icons/ios/AppIcon-29x29@2x.png | Bin 3388 -> 4340 bytes src-tauri/icons/ios/AppIcon-29x29@3x.png | Bin 5669 -> 7294 bytes src-tauri/icons/ios/AppIcon-40x40@1x.png | Bin 2104 -> 2545 bytes src-tauri/icons/ios/AppIcon-40x40@2x-1.png | Bin 5148 -> 6482 bytes src-tauri/icons/ios/AppIcon-40x40@2x.png | Bin 5148 -> 6482 bytes src-tauri/icons/ios/AppIcon-40x40@3x.png | Bin 8566 -> 11020 bytes src-tauri/icons/ios/AppIcon-512@2x.png | Bin 155370 -> 199175 bytes src-tauri/icons/ios/AppIcon-60x60@2x.png | Bin 8566 -> 11020 bytes src-tauri/icons/ios/AppIcon-60x60@3x.png | Bin 14977 -> 18934 bytes src-tauri/icons/ios/AppIcon-76x76@1x.png | Bin 4880 -> 6121 bytes src-tauri/icons/ios/AppIcon-76x76@2x.png | Bin 12056 -> 15154 bytes src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png | Bin 13502 -> 17150 bytes 204 files changed, 2044 insertions(+), 291 deletions(-) delete mode 100644 src-tauri/gen/android/.editorconfig delete mode 100644 src-tauri/gen/android/.gitignore delete mode 100644 src-tauri/gen/android/app/.gitignore delete mode 100644 src-tauri/gen/android/app/proguard-rules.pro delete mode 100644 src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/MainActivity.kt create mode 100644 src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/Ipc.kt create mode 100644 src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/Logger.kt create mode 100644 src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/PermissionHelper.kt create mode 100644 src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/Rust.kt create mode 100644 src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/RustWebChromeClient.kt create mode 100644 src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/RustWebView.kt create mode 100644 src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/RustWebViewClient.kt create mode 100644 src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/TauriActivity.kt create mode 100644 src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/WryActivity.kt create mode 100644 src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/proguard-wry.pro create mode 120000 src-tauri/gen/android/app/src/main/jniLibs/arm64-v8a/libthomann_dsp_app_lib.so create mode 120000 src-tauri/gen/android/app/src/main/jniLibs/armeabi-v7a/libthomann_dsp_app_lib.so create mode 120000 src-tauri/gen/android/app/src/main/jniLibs/x86/libthomann_dsp_app_lib.so create mode 120000 src-tauri/gen/android/app/src/main/jniLibs/x86_64/libthomann_dsp_app_lib.so delete mode 100644 src-tauri/gen/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml delete mode 100644 src-tauri/gen/android/app/src/main/res/drawable/ic_launcher_background.xml delete mode 100644 src-tauri/gen/android/app/src/main/res/layout/activity_main.xml create mode 100644 src-tauri/gen/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 src-tauri/gen/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 src-tauri/gen/android/app/src/main/res/values/ic_launcher_background.xml create mode 100644 src-tauri/gen/android/app/tauri.build.gradle.kts create mode 100644 src-tauri/gen/android/app/tauri.properties create mode 100644 src-tauri/gen/android/build/reports/problems/problems-report.html create mode 100644 src-tauri/gen/android/buildSrc/.gradle/8.14.3/executionHistory/executionHistory.bin create mode 100644 src-tauri/gen/android/buildSrc/.gradle/8.14.3/executionHistory/executionHistory.lock create mode 100644 src-tauri/gen/android/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock create mode 100644 src-tauri/gen/android/buildSrc/.gradle/buildOutputCleanup/cache.properties create mode 100644 src-tauri/gen/android/buildSrc/.gradle/buildOutputCleanup/outputFiles.bin create mode 100644 src-tauri/gen/android/buildSrc/.gradle/file-system.probe create mode 100644 src-tauri/gen/android/buildSrc/build/classes/kotlin/main/BuildTask$runTauriCli$1.class create mode 100644 src-tauri/gen/android/buildSrc/build/classes/kotlin/main/BuildTask.class create mode 100644 src-tauri/gen/android/buildSrc/build/classes/kotlin/main/Config.class create mode 100644 src-tauri/gen/android/buildSrc/build/classes/kotlin/main/META-INF/buildSrc.kotlin_module create mode 100644 src-tauri/gen/android/buildSrc/build/classes/kotlin/main/RustPlugin$apply$1$1$1$1$1.class create mode 100644 src-tauri/gen/android/buildSrc/build/classes/kotlin/main/RustPlugin$apply$1$1$1$1.class create mode 100644 src-tauri/gen/android/buildSrc/build/classes/kotlin/main/RustPlugin$apply$1$1$1$2$1$1.class create mode 100644 src-tauri/gen/android/buildSrc/build/classes/kotlin/main/RustPlugin$apply$1$1$1$2$1.class create mode 100644 src-tauri/gen/android/buildSrc/build/classes/kotlin/main/RustPlugin$apply$1$1$1.class create mode 100644 src-tauri/gen/android/buildSrc/build/classes/kotlin/main/RustPlugin$apply$1$1.class create mode 100644 src-tauri/gen/android/buildSrc/build/classes/kotlin/main/RustPlugin$apply$1$2.class create mode 100644 src-tauri/gen/android/buildSrc/build/classes/kotlin/main/RustPlugin$apply$lambda$0$$inlined$configure$1.class create mode 100644 src-tauri/gen/android/buildSrc/build/classes/kotlin/main/RustPlugin$inlined$sam$i$org_gradle_api_Action$0.class create mode 100644 src-tauri/gen/android/buildSrc/build/classes/kotlin/main/RustPlugin.class create mode 100644 src-tauri/gen/android/buildSrc/build/classes/kotlin/main/RustPluginKt.class create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin create mode 100644 src-tauri/gen/android/buildSrc/build/kotlin/compileKotlin/local-state/build-history.bin create mode 100644 src-tauri/gen/android/buildSrc/build/libs/buildSrc.jar create mode 100644 src-tauri/gen/android/buildSrc/build/pluginDescriptors/rust.properties create mode 100644 src-tauri/gen/android/buildSrc/build/resources/main/META-INF/gradle-plugins/rust.properties create mode 100644 src-tauri/gen/android/buildSrc/build/tmp/jar/MANIFEST.MF create mode 100644 src-tauri/gen/android/keystore.properties create mode 100644 src-tauri/gen/android/tauri.settings.gradle diff --git a/README.md b/README.md index 81a28e9..da5b048 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,13 @@ This template should help get you started developing with Tauri, React and Types - [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) +# Mobile Install +- npm run tauri android build -- --apk +- adb uninstall com.lucas.thomann_dsp_app +- adb install src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk + # TODO - Check end to end behavioour -- Make phone version + diff --git a/src-tauri/.gitignore b/src-tauri/.gitignore index d8769d0..6e79684 100644 --- a/src-tauri/.gitignore +++ b/src-tauri/.gitignore @@ -5,3 +5,5 @@ # Generated by Tauri # will have schema files for capabilities auto-completion /gen/schemas + +/src-tauri/gen/android/keystore.properties \ No newline at end of file diff --git a/src-tauri/gen/android/.editorconfig b/src-tauri/gen/android/.editorconfig deleted file mode 100644 index ebe51d3..0000000 --- a/src-tauri/gen/android/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -# EditorConfig is awesome: https://EditorConfig.org - -# top-most EditorConfig file -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = false -insert_final_newline = false \ No newline at end of file diff --git a/src-tauri/gen/android/.gitignore b/src-tauri/gen/android/.gitignore deleted file mode 100644 index 1c636c3..0000000 --- a/src-tauri/gen/android/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea/caches -/.idea/libraries -/.idea/modules.xml -/.idea/workspace.xml -/.idea/navEditor.xml -/.idea/assetWizardSettings.xml -.DS_Store -build -/captures -.externalNativeBuild -.cxx -local.properties -key.properties -keystore.properties - -/.tauri -/tauri.settings.gradle \ No newline at end of file diff --git a/src-tauri/gen/android/app/.gitignore b/src-tauri/gen/android/app/.gitignore deleted file mode 100644 index 6c4d56b..0000000 --- a/src-tauri/gen/android/app/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/src/main/**/generated -/src/main/jniLibs/**/*.so -/src/main/assets/tauri.conf.json -/tauri.build.gradle.kts -/proguard-tauri.pro -/tauri.properties \ No newline at end of file diff --git a/src-tauri/gen/android/app/build.gradle.kts b/src-tauri/gen/android/app/build.gradle.kts index e9468cd..a6f5eb5 100644 --- a/src-tauri/gen/android/app/build.gradle.kts +++ b/src-tauri/gen/android/app/build.gradle.kts @@ -1,4 +1,6 @@ + import java.util.Properties +import java.io.FileInputStream plugins { id("com.android.application") @@ -13,9 +15,18 @@ val tauriProperties = Properties().apply { } } +// Load release keystore properties +val keystoreProperties = Properties().apply { + val keystoreFile = rootProject.file("keystore.properties") + if (keystoreFile.exists()) { + keystoreFile.inputStream().use { load(it) } + } +} + android { compileSdk = 36 namespace = "com.lucas.thomann_dsp_app" + defaultConfig { manifestPlaceholders["usesCleartextTraffic"] = "false" applicationId = "com.lucas.thomann_dsp_app" @@ -24,20 +35,40 @@ android { versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt() versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0") } + + // Release signing configuration + signingConfigs { + create("release") { + val keystorePath = keystoreProperties.getProperty("storeFile") + + if (keystorePath != null) { + storeFile = file(keystorePath) + storePassword = keystoreProperties.getProperty("password") + keyAlias = keystoreProperties.getProperty("keyAlias") + keyPassword = keystoreProperties.getProperty("password") + } + } + } + buildTypes { getByName("debug") { manifestPlaceholders["usesCleartextTraffic"] = "true" isDebuggable = true isJniDebuggable = true isMinifyEnabled = false - packaging { jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so") + 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 + + signingConfig = signingConfigs.getByName("release") + proguardFiles( *fileTree(".") { include("**/*.pro") } .plus(getDefaultProguardFile("proguard-android-optimize.txt")) @@ -45,9 +76,11 @@ android { ) } } + kotlinOptions { jvmTarget = "1.8" } + buildFeatures { buildConfig = true } @@ -68,4 +101,4 @@ dependencies { androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0") } -apply(from = "tauri.build.gradle.kts") \ No newline at end of file +apply(from = "tauri.build.gradle.kts") diff --git a/src-tauri/gen/android/app/proguard-rules.pro b/src-tauri/gen/android/app/proguard-rules.pro deleted file mode 100644 index 481bb43..0000000 --- a/src-tauri/gen/android/app/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/src-tauri/gen/android/app/src/main/AndroidManifest.xml b/src-tauri/gen/android/app/src/main/AndroidManifest.xml index e88b1ab..e1e719e 100644 --- a/src-tauri/gen/android/app/src/main/AndroidManifest.xml +++ b/src-tauri/gen/android/app/src/main/AndroidManifest.xml @@ -7,6 +7,7 @@ diff --git a/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/MainActivity.kt b/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/MainActivity.kt deleted file mode 100644 index c07df14..0000000 --- a/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/MainActivity.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.lucas.thomann_dsp_app - -import android.os.Bundle -import androidx.activity.enableEdgeToEdge - -class MainActivity : TauriActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - enableEdgeToEdge() - super.onCreate(savedInstanceState) - } -} diff --git a/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/Ipc.kt b/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/Ipc.kt new file mode 100644 index 0000000..96c8bec --- /dev/null +++ b/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/Ipc.kt @@ -0,0 +1,25 @@ +/* THIS FILE IS AUTO-GENERATED. DO NOT MODIFY!! */ + +// Copyright 2020-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +@file:Suppress("unused") + +package com.lucas.thomann_dsp_app + +import android.webkit.* + +class Ipc(val webView: RustWebView, val webViewClient: RustWebViewClient) { + @JavascriptInterface + fun postMessage(message: String?) { + message?.let {m -> + // we're not using WebView::getUrl() here because it needs to be executed on the main thread + // and it would slow down the Ipc + // so instead we track the current URL on the webview client + Rust.ipc(webView.id, webViewClient.currentUrl, m) + } + } + + +} diff --git a/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/Logger.kt b/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/Logger.kt new file mode 100644 index 0000000..2891ec3 --- /dev/null +++ b/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/Logger.kt @@ -0,0 +1,89 @@ +/* THIS FILE IS AUTO-GENERATED. DO NOT MODIFY!! */ + +// Copyright 2020-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +@file:Suppress("unused", "MemberVisibilityCanBePrivate") + +package com.lucas.thomann_dsp_app + +// taken from https://github.com/ionic-team/capacitor/blob/6658bca41e78239347e458175b14ca8bd5c1d6e8/android/capacitor/src/main/java/com/getcapacitor/Logger.java + +import android.text.TextUtils +import android.util.Log + +class Logger { + companion object { + private const val LOG_TAG_CORE = "Tauri" + + fun tags(vararg subtags: String): String { + return if (subtags.isNotEmpty()) { + LOG_TAG_CORE + "/" + TextUtils.join("/", subtags) + } else LOG_TAG_CORE + } + + fun verbose(message: String) { + verbose(LOG_TAG_CORE, message) + } + + private fun verbose(tag: String, message: String) { + if (!shouldLog()) { + return + } + Log.v(tag, message) + } + + fun debug(message: String) { + debug(LOG_TAG_CORE, message) + } + + fun debug(tag: String, message: String) { + if (!shouldLog()) { + return + } + Log.d(tag, message) + } + + fun info(message: String) { + info(LOG_TAG_CORE, message) + } + + fun info(tag: String, message: String) { + if (!shouldLog()) { + return + } + Log.i(tag, message) + } + + fun warn(message: String) { + warn(LOG_TAG_CORE, message) + } + + fun warn(tag: String, message: String) { + if (!shouldLog()) { + return + } + Log.w(tag, message) + } + + fun error(message: String) { + error(LOG_TAG_CORE, message, null) + } + + fun error(message: String, e: Throwable?) { + error(LOG_TAG_CORE, message, e) + } + + fun error(tag: String, message: String, e: Throwable?) { + if (!shouldLog()) { + return + } + Log.e(tag, message, e) + } + + private fun shouldLog(): Boolean { + return BuildConfig.DEBUG + } + } +} diff --git a/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/PermissionHelper.kt b/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/PermissionHelper.kt new file mode 100644 index 0000000..dc7f528 --- /dev/null +++ b/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/PermissionHelper.kt @@ -0,0 +1,117 @@ +/* THIS FILE IS AUTO-GENERATED. DO NOT MODIFY!! */ + +// Copyright 2020-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +package com.lucas.thomann_dsp_app + +// taken from https://github.com/ionic-team/capacitor/blob/6658bca41e78239347e458175b14ca8bd5c1d6e8/android/capacitor/src/main/java/com/getcapacitor/PermissionHelper.java + +import android.content.Context +import android.content.pm.PackageManager +import android.os.Build +import androidx.core.app.ActivityCompat +import java.util.ArrayList + +object PermissionHelper { + /** + * Checks if a list of given permissions are all granted by the user + * + * @param permissions Permissions to check. + * @return True if all permissions are granted, false if at least one is not. + */ + fun hasPermissions(context: Context?, permissions: Array): Boolean { + for (perm in permissions) { + if (ActivityCompat.checkSelfPermission( + context!!, + perm + ) != PackageManager.PERMISSION_GRANTED + ) { + return false + } + } + return true + } + + /** + * Check whether the given permission has been defined in the AndroidManifest.xml + * + * @param permission A permission to check. + * @return True if the permission has been defined in the Manifest, false if not. + */ + fun hasDefinedPermission(context: Context, permission: String): Boolean { + var hasPermission = false + val requestedPermissions = getManifestPermissions(context) + if (!requestedPermissions.isNullOrEmpty()) { + val requestedPermissionsList = listOf(*requestedPermissions) + val requestedPermissionsArrayList = ArrayList(requestedPermissionsList) + if (requestedPermissionsArrayList.contains(permission)) { + hasPermission = true + } + } + return hasPermission + } + + /** + * Check whether all of the given permissions have been defined in the AndroidManifest.xml + * @param context the app context + * @param permissions a list of permissions + * @return true only if all permissions are defined in the AndroidManifest.xml + */ + fun hasDefinedPermissions(context: Context, permissions: Array): Boolean { + for (permission in permissions) { + if (!hasDefinedPermission(context, permission)) { + return false + } + } + return true + } + + /** + * Get the permissions defined in AndroidManifest.xml + * + * @return The permissions defined in AndroidManifest.xml + */ + private fun getManifestPermissions(context: Context): Array? { + var requestedPermissions: Array? = null + try { + val pm = context.packageManager + val packageInfo = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + pm.getPackageInfo(context.packageName, PackageManager.PackageInfoFlags.of(PackageManager.GET_PERMISSIONS.toLong())) + } else { + @Suppress("DEPRECATION") + pm.getPackageInfo(context.packageName, PackageManager.GET_PERMISSIONS) + } + if (packageInfo != null) { + requestedPermissions = packageInfo.requestedPermissions + } + } catch (_: Exception) { + } + return requestedPermissions + } + + /** + * Given a list of permissions, return a new list with the ones not present in AndroidManifest.xml + * + * @param neededPermissions The permissions needed. + * @return The permissions not present in AndroidManifest.xml + */ + fun getUndefinedPermissions(context: Context, neededPermissions: Array): Array { + val undefinedPermissions = ArrayList() + val requestedPermissions = getManifestPermissions(context) + if (!requestedPermissions.isNullOrEmpty()) { + val requestedPermissionsList = listOf(*requestedPermissions) + val requestedPermissionsArrayList = ArrayList(requestedPermissionsList) + for (permission in neededPermissions) { + if (!requestedPermissionsArrayList.contains(permission)) { + undefinedPermissions.add(permission) + } + } + var undefinedPermissionArray = arrayOfNulls(undefinedPermissions.size) + undefinedPermissionArray = undefinedPermissions.toArray(undefinedPermissionArray) + return undefinedPermissionArray + } + return neededPermissions + } +} diff --git a/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/Rust.kt b/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/Rust.kt new file mode 100644 index 0000000..9aa2cfe --- /dev/null +++ b/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/Rust.kt @@ -0,0 +1,46 @@ +/* THIS FILE IS AUTO-GENERATED. DO NOT MODIFY!! */ + +// Copyright 2020-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +@file:Suppress("unused") + +package com.lucas.thomann_dsp_app + +import android.content.Intent +import android.webkit.WebView +import android.webkit.WebResourceRequest +import android.webkit.WebResourceResponse + +object Rust { + init { + System.loadLibrary("thomann_dsp_app_lib") + } + + // Tao bindings + @JvmStatic external fun onFirstActivityCreate() + @JvmStatic external fun onCreate(activity: WryActivity) + @JvmStatic external fun onStart(activity: WryActivity) + @JvmStatic external fun onResume(activity: WryActivity) + @JvmStatic external fun onPause(activity: WryActivity) + @JvmStatic external fun onStop(activity: WryActivity) + @JvmStatic external fun onDestroy(activity: WryActivity) + @JvmStatic external fun onWindowFocusChanged(activity: WryActivity, focus: Boolean) + @JvmStatic external fun onLowMemory() + @JvmStatic external fun onNewIntent(intent: Intent) + + @JvmStatic external fun onFirstActivityCreateWry() + @JvmStatic external fun onWebviewDestroy(activity: WryActivity, webviewId: String) + + @JvmStatic external fun ipc(webviewId: String, url: String, message: String) + + @JvmStatic external fun assetLoaderDomain(webviewId: String): String? + @JvmStatic external fun handleRequest(webviewId: String, request: WebResourceRequest, isDocumentStartScriptEnabled: Boolean): WebResourceResponse? + @JvmStatic external fun shouldOverride(webviewId: String, url: String): Boolean + @JvmStatic external fun onPageLoading(webviewId: String, url: String) + @JvmStatic external fun onPageLoaded(webviewId: String, url: String) + @JvmStatic external fun onEval(webviewId: String, id: Int, result: String) + + @JvmStatic external fun handleReceivedTitle(webviewId: String, title: String) +} \ No newline at end of file diff --git a/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/RustWebChromeClient.kt b/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/RustWebChromeClient.kt new file mode 100644 index 0000000..502af08 --- /dev/null +++ b/src-tauri/gen/android/app/src/main/java/com/lucas/thomann_dsp_app/generated/RustWebChromeClient.kt @@ -0,0 +1,519 @@ +/* THIS FILE IS AUTO-GENERATED. DO NOT MODIFY!! */ + +// Copyright 2020-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +@file:Suppress("ObsoleteSdkInt", "RedundantOverride", "QueryPermissionsNeeded", "SimpleDateFormat") + +package com.lucas.thomann_dsp_app + +// taken from https://github.com/ionic-team/capacitor/blob/6658bca41e78239347e458175b14ca8bd5c1d6e8/android/capacitor/src/main/java/com/getcapacitor/BridgeWebChromeClient.java + +import android.Manifest +import android.app.Activity +import android.app.AlertDialog +import android.content.ActivityNotFoundException +import android.content.DialogInterface +import android.content.Intent +import android.graphics.Bitmap +import android.net.Uri +import android.os.Build +import android.os.Environment +import android.provider.MediaStore +import android.view.View +import android.webkit.* +import android.widget.EditText +import androidx.core.content.FileProvider +import java.io.File +import java.io.IOException +import java.text.SimpleDateFormat +import java.util.* + +class RustWebChromeClient(private val activity: WryActivity, private val webViewId: String) : WebChromeClient() { + private companion object { + const val PERMISSION_REQUEST_DEFAULT = 0 + const val PERMISSION_REQUEST_ALLOW = 1 + const val PERMISSION_REQUEST_DENY = 2 + } + + /** + * Render web content in `view`. + * + * Both this method and [.onHideCustomView] are required for + * rendering web content in full screen. + * + * @see [](https://developer.android.com/reference/android/webkit/WebChromeClient.onShowCustomView + ) */ + override fun onShowCustomView(view: View, callback: CustomViewCallback) { + callback.onCustomViewHidden() + super.onShowCustomView(view, callback) + } + + /** + * Render web content in the original Web View again. + * + * Do not remove this method--@see #onShowCustomView(View, CustomViewCallback). + */ + override fun onHideCustomView() { + super.onHideCustomView() + } + + override fun onPermissionRequest(request: PermissionRequest) { + val requestedResources = request.resources + if (requestedResources.isEmpty()) { + request.deny() + return + } + + val allowedResources = ArrayList() + val defaultResources = ArrayList() + + for (resource in requestedResources) { + when (onPermissionRequestNative(webViewId, resource)) { + PERMISSION_REQUEST_DENY -> {} + PERMISSION_REQUEST_ALLOW -> allowedResources.add(resource) + PERMISSION_REQUEST_DEFAULT -> defaultResources.add(resource) + } + } + + val resources = + allowedResources.plus(filterKnownPermissions(defaultResources)).toList().toTypedArray() + grantPermissionRequest(request, resources) + } + + private fun grantPermissionRequest(request: PermissionRequest, resources: Array) { + if (resources.isEmpty()) { + request.deny() + return + } + + val isRequestPermissionRequired = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M + val permissionList = androidPermissionsForResources(resources) + if (permissionList.isNotEmpty() && isRequestPermissionRequired) { + val permissions = permissionList.toTypedArray() + activity.requestPermissions(permissions) { isGranted -> + if (isGranted == true) { + request.grant(resources) + } else { + request.deny() + } + } + } else { + request.grant(resources) + } + } + + private fun androidPermissionsForResources(resources: Array): MutableList { + val permissionList: MutableList = ArrayList() + if (resources.contains(PermissionRequest.RESOURCE_VIDEO_CAPTURE)) { + permissionList.add(Manifest.permission.CAMERA) + } + if (resources.contains(PermissionRequest.RESOURCE_AUDIO_CAPTURE)) { + permissionList.add(Manifest.permission.MODIFY_AUDIO_SETTINGS) + permissionList.add(Manifest.permission.RECORD_AUDIO) + } + return permissionList + } + + /** + * @return one of the PERMISSION_REQUEST_* constants. + */ + private external fun onPermissionRequestNative(webviewId: String, resource: String): Int + + override fun getDefaultVideoPoster(): Bitmap { + // Return a transparent bitmap so Chromium doesn't paint its default gray play-button placeholder on