forked from tauri-apps/tauri
-
Notifications
You must be signed in to change notification settings - Fork 0
Sync fork: merge upstream tauri-apps/tauri dev #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
e2e585a
fix(android): update template to use gradle 9 (#15828)
Legend-Master 448d39e
fix: menu related commands can panic (#15860)
Legend-Master de5e25b
Merge upstream tauri-apps/tauri dev into OlympusLedgerOrg/tauri dev
OlympusLedgerOrg 90042ee
fix(android): keep RuntimeVisibleAnnotations/AnnotationDefault in con…
OlympusLedgerOrg df64d7d
fix: apply remaining CodeRabbit auto-fixes
OlympusLedgerOrg f53eed2
fix(ci): add missing changeset tag and restore gradlew exec bit
OlympusLedgerOrg baa5a36
Merge branch 'dev' into sync-upstream-dev-2026-08-11
OlympusLedgerOrg 89b0323
fix(example): set AppCompat theme, fix clean task, remove conflicting…
OlympusLedgerOrg 9ae6221
fix(example): fix README formatting, disable AGP 9 built-in Kotlin
OlympusLedgerOrg 69d03df
fix(example): dontwarn missing errorprone annotation from androidx.test
OlympusLedgerOrg 94aacf9
fix(example): wire proguard-rules.pro into testProguardFiles too
OlympusLedgerOrg d41113f
ci(android): bound r8 plugin discovery job with timeout-minutes
claude 118dac9
ci(android): capture diagnostics for r8 plugin discovery hang
claude 646087e
ci(android): print r8 plugin discovery diagnostics into the job log
claude 25cece3
fix(example): keep androidx.tracing.Trace in r8 plugin discovery test…
claude db67836
fix(example): keep kotlin.jvm.internal.** in r8 plugin discovery test…
claude c07122e
fix(example): keep the whole kotlin stdlib in r8 plugin discovery tes…
claude 2dd4b05
fix: apply CodeRabbit auto-fixes
coderabbitai[bot] a19ef86
fix(example): keep Jackson ObjectMapper stable across app/test APK R8…
claude 217589b
fix(android): keep Invoke's constructor in consumer-rules.pro
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| tauri: patch:bug | ||
| --- | ||
|
|
||
| On Android, keep `RuntimeVisibleAnnotations` and `AnnotationDefault` in the `tauri-android` consumer ProGuard/R8 rules. Without them, R8 could strip the annotation metadata that reflective plugin discovery relies on (`TauriPlugin.permissions`, `@Command`/`@ActivityCallback`/`@PermissionCallback` method lookup) in a minified release build, even though the class and method `-keep` rules on their own left the plugin's classes and methods in place. Added `examples/android-r8-plugin-discovery`, an instrumented-test module that builds a minified "release" app depending only on the shipped consumer rules and asserts plugin discovery still works. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| --- | ||
| tauri: minor:deps | ||
| tauri-cli: minor:deps | ||
| "tauri-apps/cli": minor:deps | ||
| --- | ||
|
|
||
| On Android, fix missing `consumer-rules.pro` file in the template. | ||
|
|
||
| **IMPORTANT**: For plugin authors, update your `build.gradle.kts` file to remove the | ||
|
|
||
| ```kotlin | ||
| buildTypes { | ||
| release { | ||
| isMinifyEnabled = false | ||
| proguardFiles( | ||
| getDefaultProguardFile("proguard-android-optimize.txt"), | ||
| "proguard-rules.pro" | ||
| ) | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| section and rename your `proguard-rules.pro` to `consumer-rules.pro` to match the `consumerProguardFiles("consumer-rules.pro")` in the template. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| tauri: minor:deps | ||
| tauri-build: minor:deps | ||
| tauri-cli: minor:deps | ||
| "tauri-apps/cli": minor:deps | ||
| --- | ||
|
|
||
| On Android, updated the template to use Gradle v9.6.1 (`com.android.tools.build:gradle` v9.3.1) and Kotlin v2.2. Use `tauri android init` to apply the change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| tauri: minor:bug | ||
| tauri-macros: minor:bug | ||
| --- | ||
|
|
||
| Fix menu-related commands can panic if called with invalid menu types through `invoke` directly. | ||
|
OlympusLedgerOrg marked this conversation as resolved.
|
||
|
|
||
| - The internal `do_menu_item!` macro now returns `Err(crate::Error::UnexpectedMenuKind)` instead of `unreachable!()` | ||
| - Added a new error type `tauri::Error::UnexpectedMenuKind` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| # Copyright 2019-2024 Tauri Programme within The Commons Conservancy | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # SPDX-License-Identifier: MIT | ||
|
|
||
| # Regression test for crates/tauri/mobile/android/consumer-rules.pro: proves a | ||
| # minified ("release", isMinifyEnabled = true) app that only depends on the | ||
| # tauri-android library's own consumer ProGuard rules can still reflectively | ||
| # discover and invoke a @TauriPlugin's @Command / @ActivityCallback / | ||
| # @PermissionCallback methods and read TauriPlugin.permissions. See | ||
| # examples/android-r8-plugin-discovery/README.md. | ||
| # | ||
| # This must run on a real device/emulator: `testBuildType = "release"` means | ||
| # the instrumented test below installs and runs the actual R8-minified APK, | ||
| # which is the only way to observe R8 stripping RuntimeVisibleAnnotations / | ||
| # AnnotationDefault -- a JVM unit test never sees R8 output at all. | ||
| name: test android r8 plugin discovery | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - '.github/workflows/test-android-r8-plugin-discovery.yml' | ||
| - 'crates/tauri/mobile/android/consumer-rules.pro' | ||
| - 'crates/tauri/mobile/android/src/main/java/app/tauri/annotation/**' | ||
| - 'crates/tauri/mobile/android/src/main/java/app/tauri/plugin/**' | ||
| - 'crates/tauri/mobile/android/build.gradle.kts' | ||
| - 'examples/android-r8-plugin-discovery/**' | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| test: | ||
| # KVM-backed runner required by the emulator action. | ||
| runs-on: ubuntu-latest | ||
| # Bounds a hung/deadlocked instrumented test run (e.g. connectedReleaseAndroidTest | ||
| # never returning) to a fast failure instead of GitHub's 360-minute default. | ||
| timeout-minutes: 15 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 25 | ||
| cache: gradle | ||
|
|
||
| - name: setup Android SDK | ||
| uses: android-actions/setup-android@v3 | ||
|
|
||
| - name: enable KVM | ||
| run: | | ||
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
| sudo udevadm control --reload-rules | ||
| sudo udevadm trigger --name-match=kvm | ||
|
|
||
| - name: run minified-release plugin discovery test | ||
| # Leaves headroom inside the job's 15-minute budget for the always() | ||
| # diagnostics upload below to run after this step is cancelled. | ||
| timeout-minutes: 12 | ||
| uses: reactivecircus/android-emulator-runner@v2 | ||
| with: | ||
| working-directory: examples/android-r8-plugin-discovery | ||
| api-level: 34 | ||
| target: google_apis | ||
| arch: x86_64 | ||
| disable-animations: true | ||
| # connectedAndroidTest prints nothing to the Gradle console between | ||
| # task start and completion by default, which previously made a | ||
| # hang indistinguishable from a slow run. --info surfaces adb | ||
| # install/instrumentation progress, and the background logcat | ||
| # capture records what the device/app were doing if it hangs again. | ||
| script: | | ||
| "$ANDROID_HOME/platform-tools/adb" logcat -c | ||
| "$ANDROID_HOME/platform-tools/adb" logcat -v threadtime > "$GITHUB_WORKSPACE/r8-plugin-discovery-logcat.txt" & | ||
| logcat_pid=$! | ||
| trap 'kill "$logcat_pid" 2>/dev/null; wait "$logcat_pid" 2>/dev/null || true' EXIT | ||
| ./gradlew :app:connectedReleaseAndroidTest --stacktrace --info | ||
|
|
||
| # Artifact downloads require reaching Azure Blob Storage, which some CI | ||
| # log viewers can't do -- print the diagnostics into the job log itself | ||
| # (app-relevant logcat lines + any XML test results) so they're always | ||
| # readable from the run's own log output, even after a cancellation. | ||
| - name: print diagnostics | ||
| if: always() | ||
| run: | | ||
| echo "::group::logcat (com.example.r8plugindiscovery / runtime / instrumentation lines)" | ||
| grep -E 'com\.example\.r8plugindiscovery|AndroidRuntime|FATAL EXCEPTION|ActivityManager|TestRunner|ANR |Instrumentation' \ | ||
| r8-plugin-discovery-logcat.txt 2>/dev/null | tail -n 400 || echo "(no logcat file captured)" | ||
| echo "::endgroup::" | ||
| echo "::group::androidTest XML results" | ||
| for d in examples/android-r8-plugin-discovery/app/build/outputs/androidTest-results \ | ||
| examples/android-r8-plugin-discovery/app/build/reports/androidTests; do | ||
| [ -d "$d" ] && find "$d" -type f -exec sh -c 'echo "--- $1 ---"; cat "$1"' sh {} \; | ||
| done | ||
| echo "::endgroup::" | ||
|
|
||
| - name: upload diagnostics | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: r8-plugin-discovery-diagnostics | ||
| if-no-files-found: ignore | ||
| retention-days: 5 | ||
| path: | | ||
| r8-plugin-discovery-logcat.txt | ||
| examples/android-r8-plugin-discovery/app/build/reports/androidTests/connected/** | ||
| examples/android-r8-plugin-discovery/app/build/outputs/androidTest-results/connected/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-10.5 KB
(82%)
crates/tauri-cli/templates/mobile/android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
crates/tauri-cli/templates/mobile/android/gradle/wrapper/gradle-wrapper.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| #Tue May 10 19:22:52 CST 2022 | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip | ||
| distributionPath=wrapper/dists | ||
| zipStorePath=wrapper/dists | ||
| zipStoreBase=GRADLE_USER_HOME |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.