Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,22 @@ jobs:
echo "password=$ANDROID_KEY_PASSWORD" >> keystore.properties
echo "storeFile=$RUNNER_TEMP/keystore.jks" >> keystore.properties

- name: Generate tauri.properties (Workaround for Tauri 2.9.x bug)
run: |
# Workaround for Tauri 2.9.x not generating tauri.properties correctly
# See: https://github.com/tauri-apps/tauri/issues/YOUR_ISSUE_NUMBER
VERSION=$(jq -r '.version' frontend/src-tauri/tauri.conf.json)
VERSION_CODE=$(jq -r '.bundle.android.versionCode' frontend/src-tauri/tauri.conf.json)

mkdir -p frontend/src-tauri/gen/android/app
cat > frontend/src-tauri/gen/android/app/tauri.properties << EOF
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syntax: Java Properties files use # for comments, not //. Should be:

Suggested change
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/android-build.yml
Line: 138:138

Comment:
**syntax:** Java Properties files use `#` for comments, not `//`. Should be:
```suggestion
          # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
```

How can I resolve this? If you propose a fix, please make it concise.

tauri.android.versionName=$VERSION
tauri.android.versionCode=$VERSION_CODE
EOF

echo "Generated tauri.properties with version $VERSION and versionCode $VERSION_CODE"
Comment on lines +129 to +143

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix Java properties file comment syntax.

Java .properties files use # for comments, not //. Line 138 uses the wrong format, which will likely cause Android build tools to misparse or reject the properties file.

Apply this diff to fix the comment syntax:

  mkdir -p frontend/src-tauri/gen/android/app
  cat > frontend/src-tauri/gen/android/app/tauri.properties << EOF
-         // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+         # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
          tauri.android.versionName=$VERSION
          tauri.android.versionCode=$VERSION_CODE
          EOF

Also, replace the placeholder issue reference on line 132 with the actual Tauri issue number once available.

🤖 Prompt for AI Agents
.github/workflows/android-build.yml around lines 129 to 143: the generated
tauri.properties uses Java properties comment syntax '//' which is invalid;
change the leading comment on the generated file to use '#' (e.g. replace "//
THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY." with "# THIS IS
AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.") so Android build tools
parse it correctly, and also replace the placeholder "YOUR_ISSUE_NUMBER" in the
referenced GitHub URL with the actual Tauri issue number (or remove the
placeholder) in the run block comment.


- name: Build Tauri Android App (Signed Release)
working-directory: ./frontend
run: |
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,22 @@ jobs:
echo "password=$ANDROID_KEY_PASSWORD" >> keystore.properties
echo "storeFile=$RUNNER_TEMP/keystore.jks" >> keystore.properties

- name: Generate tauri.properties (Workaround for Tauri 2.9.x bug)
run: |
# Workaround for Tauri 2.9.x not generating tauri.properties correctly
# See: https://github.com/tauri-apps/tauri/issues/YOUR_ISSUE_NUMBER
VERSION=$(jq -r '.version' frontend/src-tauri/tauri.conf.json)
VERSION_CODE=$(jq -r '.bundle.android.versionCode' frontend/src-tauri/tauri.conf.json)

mkdir -p frontend/src-tauri/gen/android/app
cat > frontend/src-tauri/gen/android/app/tauri.properties << EOF
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syntax: Java Properties files use # for comments, not //. Should be:

Suggested change
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/release.yml
Line: 234:234

Comment:
**syntax:** Java Properties files use `#` for comments, not `//`. Should be:
```suggestion
          # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
```

How can I resolve this? If you propose a fix, please make it concise.

tauri.android.versionName=$VERSION
tauri.android.versionCode=$VERSION_CODE
EOF

echo "Generated tauri.properties with version $VERSION and versionCode $VERSION_CODE"
Comment on lines +225 to +239

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix Java properties file comment syntax (same issue as android-build.yml).

Java .properties files use # for comments, not //. Line 234 uses the wrong format, which will cause Android build tools to reject the properties file.

Apply this diff to fix the comment syntax:

  mkdir -p frontend/src-tauri/gen/android/app
  cat > frontend/src-tauri/gen/android/app/tauri.properties << EOF
-         // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+         # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
          tauri.android.versionName=$VERSION
          tauri.android.versionCode=$VERSION_CODE
          EOF

Also, replace the placeholder issue reference on line 228 with the actual Tauri issue number.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Generate tauri.properties (Workaround for Tauri 2.9.x bug)
run: |
# Workaround for Tauri 2.9.x not generating tauri.properties correctly
# See: https://github.com/tauri-apps/tauri/issues/YOUR_ISSUE_NUMBER
VERSION=$(jq -r '.version' frontend/src-tauri/tauri.conf.json)
VERSION_CODE=$(jq -r '.bundle.android.versionCode' frontend/src-tauri/tauri.conf.json)
mkdir -p frontend/src-tauri/gen/android/app
cat > frontend/src-tauri/gen/android/app/tauri.properties << EOF
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
tauri.android.versionName=$VERSION
tauri.android.versionCode=$VERSION_CODE
EOF
echo "Generated tauri.properties with version $VERSION and versionCode $VERSION_CODE"
- name: Generate tauri.properties (Workaround for Tauri 2.9.x bug)
run: |
# Workaround for Tauri 2.9.x not generating tauri.properties correctly
# See: https://github.com/tauri-apps/tauri/issues/YOUR_ISSUE_NUMBER
VERSION=$(jq -r '.version' frontend/src-tauri/tauri.conf.json)
VERSION_CODE=$(jq -r '.bundle.android.versionCode' frontend/src-tauri/tauri.conf.json)
mkdir -p frontend/src-tauri/gen/android/app
cat > frontend/src-tauri/gen/android/app/tauri.properties << EOF
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
tauri.android.versionName=$VERSION
tauri.android.versionCode=$VERSION_CODE
EOF
echo "Generated tauri.properties with version $VERSION and versionCode $VERSION_CODE"
🤖 Prompt for AI Agents
.github/workflows/release.yml lines 225-239: the autogenerated tauri.properties
uses C/JS `//` comment syntax which is invalid for Java .properties files and
will break Android build tools; update the heredoc so the comment line uses `#
THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.` instead of `//
...`, and also replace the placeholder Tauri issue URL on the comment above
(line ~228) with the actual Tauri issue number reference.


- name: Build Tauri Android App (Signed Release)
working-directory: ./frontend
run: |
Expand Down
2 changes: 1 addition & 1 deletion frontend/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"developmentTeam": "X773Y823TN"
},
"android": {
"versionCode": 1099005000
"versionCode": 1099005002
},
"windows": {
"certificateThumbprint": null,
Expand Down
Loading