Skip to content

Commit 9b8867e

Browse files
authored
Patch pdfrx cmakelists during build (#78)
* patch pdfrx cmakelists during build * patch pfrx in publish.yml
1 parent bace84c commit 9b8867e

File tree

4 files changed

+26
-4
lines changed

4 files changed

+26
-4
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ jobs:
2020
with:
2121
channel: 'stable'
2222
- run: flutter pub get
23+
- name: Patch pdfrx
24+
run: |
25+
PDFRX_PATH=$(find $HOME/.pub-cache -type d -name "pdfrx*" | head -n 1)
26+
CMAKE_FILE="$PDFRX_PATH/android/CMakeLists.txt"
27+
if [ -f "$CMAKE_FILE" ]; then
28+
sed -i '2i add_link_options("LINKER:--build-id=none")' "$CMAKE_FILE"
29+
echo "Patched CMakeLists.txt in $CMAKE_FILE"
30+
else
31+
echo "CMakeLists.txt not found in expected location"
32+
exit 1
33+
fi
2334
- run: flutter build apk --debug
2435
- uses: actions/upload-artifact@v4
2536
with:

.github/workflows/publish.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ jobs:
1919
with:
2020
channel: 'stable'
2121
- run: flutter pub get
22+
- name: Patch pdfrx
23+
run: |
24+
PDFRX_PATH=$(find $HOME/.pub-cache -type d -name "pdfrx*" | head -n 1)
25+
CMAKE_FILE="$PDFRX_PATH/android/CMakeLists.txt"
26+
if [ -f "$CMAKE_FILE" ]; then
27+
sed -i '2i add_link_options("LINKER:--build-id=none")' "$CMAKE_FILE"
28+
echo "Patched CMakeLists.txt in $CMAKE_FILE"
29+
else
30+
echo "CMakeLists.txt not found in expected location"
31+
exit 1
32+
fi
2233
- name: Decode Keystore
2334
run: |
2435
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > android/app/keystore.jks

android/fastlane/Fastfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ platform :android do
2424
json_key: 'google_service_account.json',
2525
skip_upload_apk: true,
2626
validate_only: false,
27-
#skip_upload_metadata: true, # Skip uploading metadata
28-
#skip_upload_images: true, # Skip uploading screenshots
29-
#skip_upload_screenshots: true, # Skip uploading screenshots
27+
skip_upload_metadata: true, # Skip uploading metadata
28+
skip_upload_images: true, # Skip uploading screenshots
29+
skip_upload_screenshots: true, # Skip uploading screenshots
3030
release_status: "draft", # Can be 'draft', 'completed', 'halted'
3131
aab: '../build/app/outputs/bundle/release/app-release.aab', # Path to your AAB file
3232
#version_code: version["version_code"], # From pubspec.yaml

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1616
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
1717
# In Windows, build-name is used as the major, minor, and patch parts
1818
# of the product and file versions while build-number is used as the build suffix.
19-
version: 0.2.0+11
19+
version: 0.2.0+14
2020

2121
environment:
2222
sdk: '>=3.2.3 <4.0.0'

0 commit comments

Comments
 (0)