Skip to content

Commit 5048416

Browse files
committed
Merge branch 'main' of github.com:callstack-internal/Expensify-App into eslint-9-no-unsafe-call
2 parents d257e10 + 98eeb6c commit 5048416

129 files changed

Lines changed: 5867 additions & 1960 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,17 @@ jobs:
298298
with:
299299
IS_DESKTOP_BUILD: true
300300

301+
# v6.0.0
302+
- name: Setup Python for node-gyp
303+
id: setup-python
304+
uses: actions/setup-python@18566f86b301499665bd3eb1a2247e0849c64fa5
305+
with:
306+
python-version: '3.12'
307+
cache: 'pip'
308+
309+
- name: Ensure setuptools for node-gyp
310+
run: python -m pip install --upgrade pip setuptools
311+
301312
- name: Load Desktop credentials from 1Password
302313
id: load-credentials
303314
# v2
@@ -321,6 +332,7 @@ jobs:
321332
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
322333
GCP_GEOLOCATION_API_KEY: ${{ secrets.GCP_GEOLOCATION_API_KEY_PRODUCTION }}
323334
S3_BUCKET: ${{ github.ref == 'refs/heads/production' && vars.PRODUCTION_S3_BUCKET || vars.STAGING_S3_BUCKET }}
335+
PYTHON: ${{ steps.setup-python.outputs.python-path }}
324336

325337
- name: Upload desktop sourcemaps artifact
326338
# v4

.github/workflows/testBuild.yml

Lines changed: 86 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,17 @@ jobs:
185185
with:
186186
IS_DESKTOP_BUILD: true
187187

188+
# v6.0.0
189+
- name: Setup python for node-gyp
190+
id: setup-python
191+
uses: actions/setup-python@18566f86b301499665bd3eb1a2247e0849c64fa5
192+
with:
193+
python-version: '3.12'
194+
cache: 'pip'
195+
196+
- name: Ensure setuptools for node-gyp
197+
run: python -m pip install --upgrade pip setuptools
198+
188199
- name: Load Desktop credentials from 1Password
189200
id: load-credentials
190201
# v2
@@ -215,6 +226,7 @@ jobs:
215226
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
216227
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
217228
GCP_GEOLOCATION_API_KEY: ${{ secrets.GCP_GEOLOCATION_API_KEY_STAGING }}
229+
PYTHON: ${{ steps.setup-python.outputs.python-path }}
218230

219231
web:
220232
name: Build and deploy Web
@@ -257,7 +269,7 @@ jobs:
257269
needs: [prep, getMobileExpensifyPR, getMobileExpensifyRef]
258270
runs-on: ubuntu-latest-xl
259271
outputs:
260-
S3_APK_PATH: ${{ steps.exportAndroidS3Path.outputs.S3_APK_PATH }}
272+
ROCK_APK_PATH: ${{ steps.rock-remote-build-android.outputs.artifact-url }}
261273
steps:
262274
- name: Checkout
263275
# v4
@@ -334,35 +346,25 @@ jobs:
334346
ANDROID_UPLOAD_KEYSTORE_ALIAS: op://${{ vars.OP_VAULT }}/Repository-Secrets/ANDROID_UPLOAD_KEYSTORE_ALIAS
335347
ANDROID_UPLOAD_KEY_PASSWORD: op://${{ vars.OP_VAULT }}/Repository-Secrets/ANDROID_UPLOAD_KEY_PASSWORD
336348

337-
- name: Build Android app
338-
id: build
349+
- name: Rock Remote Build - Android
350+
id: rock-remote-build-android
351+
uses: callstackincubator/android@1585a4a0b32801c26d2dae67a09f0df530df25c0 # v3
339352
env:
340-
ANDROID_UPLOAD_KEYSTORE_PASSWORD: ${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_PASSWORD }}
341-
ANDROID_UPLOAD_KEYSTORE_ALIAS: ${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_ALIAS }}
342-
ANDROID_UPLOAD_KEY_PASSWORD: ${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEY_PASSWORD }}
343-
run: bundle exec fastlane android build_adhoc_hybrid
344-
345-
- name: Configure AWS Credentials
346-
# v4
347-
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722
353+
IS_HYBRID_APP: true
354+
GITHUB_TOKEN: ${{ github.token }}
348355
with:
349-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
350-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
351-
aws-region: us-east-1
352-
353-
- name: Upload Android AdHoc build to S3
354-
run: bundle exec fastlane android upload_s3
355-
env:
356-
S3_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY_ID }}
357-
S3_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
358-
S3_BUCKET: ad-hoc-expensify-cash
359-
S3_REGION: us-east-1
360-
361-
- name: Export S3 path
362-
id: exportAndroidS3Path
363-
run: |
364-
# $s3APKPath is set from within the Fastfile, android upload_s3 lane
365-
echo "S3_APK_PATH=$s3APKPath" >> "$GITHUB_OUTPUT"
356+
variant: 'Adhoc'
357+
sign: true
358+
re-sign: true
359+
keystore-file: './upload-key.keystore'
360+
keystore-store-file: 'upload-key.keystore'
361+
keystore-store-password: ${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_PASSWORD }}
362+
keystore-key-alias: ${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_ALIAS }}
363+
keystore-key-password: ${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEY_PASSWORD }}
364+
# Specify the path (relative to the Android source directory) where the keystore should be placed.
365+
keystore-path: '../tools/buildtools/upload-key.keystore'
366+
comment-bot: false
367+
rock-build-extra-params: '--extra-params -PreactNativeArchitectures=arm64-v8a,x86_64'
366368

367369
iosHybrid:
368370
name: Build and deploy iOS for testing
@@ -372,7 +374,7 @@ jobs:
372374
DEVELOPER_DIR: /Applications/Xcode_26.0.app/Contents/Developer
373375
runs-on: macos-15-xlarge
374376
outputs:
375-
IOS_PATH: ${{ steps.export-ios-path.outputs.IOS_PATH }}
377+
ROCK_IOS_PATH: ${{ steps.rock-remote-build-ios.outputs.artifact-url }}
376378
steps:
377379
- name: Checkout
378380
# v4
@@ -438,6 +440,7 @@ jobs:
438440
# v1
439441
uses: 1password/install-cli-action@143a85f84a90555d121cde2ff5872e393a47ab9f
440442

443+
441444
- name: Load files from 1Password
442445
env:
443446
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
@@ -447,34 +450,57 @@ jobs:
447450
op read "op://${{ vars.OP_VAULT }}/OldApp_AdHoc_Notification_Service/OldApp_AdHoc_Notification_Service.mobileprovision" --force --out-file ./OldApp_AdHoc_Notification_Service.mobileprovision
448451
op read "op://${{ vars.OP_VAULT }}/New Expensify Distribution Certificate/Certificates.p12" --force --out-file ./Certificates.p12
449452
450-
- name: Build AdHoc app
451-
run: bundle exec fastlane ios build_adhoc_hybrid
452-
453-
- name: Configure AWS Credentials
454-
# v4
455-
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722
456-
with:
457-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
458-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
459-
aws-region: us-east-1
460-
461-
- name: Upload AdHoc build to S3
462-
run: bundle exec fastlane ios upload_s3
463-
env:
464-
S3_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY_ID }}
465-
S3_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
466-
S3_BUCKET: ad-hoc-expensify-cash
467-
S3_REGION: us-east-1
468-
469-
- name: Export iOS path
470-
id: export-ios-path
453+
- name: Create ExportOptions.plist
471454
run: |
472-
content_ios="$(cat ./ios_paths.json)"
473-
content_ios="${content_ios//'%'/'%25'}"
474-
content_ios="${content_ios//$'\n'/'%0A'}"
475-
content_ios="${content_ios//$'\r'/'%0D'}"
476-
ios_path=$(echo "$content_ios" | jq -r '.html_path')
477-
echo "IOS_PATH=$ios_path" >> "$GITHUB_OUTPUT"
455+
cat > Mobile-Expensify/iOS/ExportOptions.plist << 'EOF'
456+
<?xml version="1.0" encoding="UTF-8"?>
457+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
458+
<plist version="1.0">
459+
<dict>
460+
<key>method</key>
461+
<string>ad-hoc</string>
462+
<key>provisioningProfiles</key>
463+
<dict>
464+
<key>com.expensify.expensifylite.adhoc</key>
465+
<string>(OldApp) AdHoc</string>
466+
<key>com.expensify.expensifylite.adhoc.SmartScanExtension</key>
467+
<string>(OldApp) AdHoc: Share Extension</string>
468+
<key>com.expensify.expensifylite.adhoc.NotificationServiceExtension</key>
469+
<string>(OldApp) AdHoc: Notification Service</string>
470+
</dict>
471+
</dict>
472+
</plist>
473+
EOF
474+
475+
- name: Rock Remote Build - iOS
476+
id: rock-remote-build-ios
477+
uses: callstackincubator/ios@79778c5739839044d2ca5af75ace7ba0467b5366 # v3
478+
env:
479+
GITHUB_TOKEN: ${{ github.token }}
480+
IS_HYBRID_APP: true
481+
with:
482+
destination: device
483+
re-sign: true
484+
ad-hoc: true
485+
scheme: 'Expensify AdHoc'
486+
configuration: 'AdHoc'
487+
certificate-file: './Certificates.p12'
488+
provisioning-profiles: |
489+
[
490+
{
491+
"name": "(OldApp) AdHoc",
492+
"file": "./OldApp_AdHoc.mobileprovision"
493+
},
494+
{
495+
"name": "(OldApp) AdHoc: Share Extension",
496+
"file": "./OldApp_AdHoc_Share_Extension.mobileprovision"
497+
},
498+
{
499+
"name": "(OldApp) AdHoc: Notification Service",
500+
"file": "./OldApp_AdHoc_Notification_Service.mobileprovision"
501+
}
502+
]
503+
comment-bot: false
478504

479505
postGithubComment:
480506
runs-on: ubuntu-latest
@@ -504,9 +530,9 @@ jobs:
504530
DESKTOP: ${{ needs.desktop.result }}
505531
IOS: ${{ needs.iosHybrid.result }}
506532
WEB: ${{ needs.web.result }}
507-
ANDROID_LINK: ${{ needs.androidHybrid.outputs.S3_APK_PATH }}
533+
ANDROID_LINK: ${{ needs.androidHybrid.outputs.ROCK_APK_PATH }}
508534
DESKTOP_LINK: https://ad-hoc-expensify-cash.s3.amazonaws.com/desktop/${{ inputs.APP_PULL_REQUEST_NUMBER }}/NewExpensify.dmg
509-
IOS_LINK: ${{ needs.iosHybrid.outputs.IOS_PATH }}
535+
IOS_LINK: ${{ needs.iosHybrid.outputs.ROCK_IOS_PATH }}
510536
WEB_LINK: https://${{ inputs.APP_PULL_REQUEST_NUMBER }}.pr-testing.expensify.com
511537

512538
- name: Publish links to apps for download on Expensify/Mobile-Expensify PR
@@ -518,5 +544,5 @@ jobs:
518544
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
519545
ANDROID: ${{ needs.androidHybrid.result }}
520546
IOS: ${{ needs.iosHybrid.result }}
521-
ANDROID_LINK: ${{ needs.androidHybrid.outputs.S3_APK_PATH }}
522-
IOS_LINK: ${{ needs.iosHybrid.outputs.IOS_PATH }}
547+
ANDROID_LINK: ${{ needs.androidHybrid.outputs.ROCK_APK_PATH }}
548+
IOS_LINK: ${{ needs.iosHybrid.outputs.ROCK_IOS_PATH }}

Mobile-Expensify

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ android {
114114
minSdkVersion rootProject.ext.minSdkVersion
115115
targetSdkVersion rootProject.ext.targetSdkVersion
116116
multiDexEnabled rootProject.ext.multiDexEnabled
117-
versionCode 1009023200
118-
versionName "9.2.32-0"
117+
versionCode 1009023300
118+
versionName "9.2.33-0"
119119
// Supported language variants must be declared here to avoid from being removed during the compilation.
120120
// This also helps us to not include unnecessary language variants in the APK.
121121
resConfigs "en", "es"

config/electronBuilder.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ module.exports = {
4747
extraMetadata: {
4848
version,
4949
},
50+
asarUnpack: ['**/node-mac-permissions/bin/**'],
5051
mac: {
5152
category: 'public.app-category.finance',
5253
icon: macIcon[process.env.ELECTRON_ENV],
@@ -60,8 +61,11 @@ module.exports = {
6061
arch: ['universal'],
6162
},
6263
],
64+
x64ArchFiles: '**/node_modules/node-mac-permissions/bin/**',
6365
extendInfo: {
6466
CFBundleIconName: getMacBundleIconName(),
67+
NSLocationWhenInUseUsageDescription: 'This app uses location to help you track distance expenses.',
68+
NSLocationUsageDescription: 'This app uses location to help you track distance expenses.',
6569
},
6670
},
6771
dmg: {

config/webpack/webpack.desktop.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'path';
22
import type {Configuration} from 'webpack';
33
import webpack from 'webpack';
44
// eslint-disable-next-line @dword-design/import-alias/prefer-alias, import/no-relative-packages -- alias imports don't work for webpack
5-
import {dependencies as desktopDependencies} from '../../desktop/package.json';
5+
import {dependencies as desktopDependencies, optionalDependencies as desktopOptionalDependencies} from '../../desktop/package.json';
66
import type Environment from './types';
77
import getCommonConfiguration from './webpack.common';
88

@@ -38,7 +38,7 @@ const getConfiguration = (environment: Environment): Configuration[] => {
3838
},
3939
resolve: rendererConfig.resolve,
4040
plugins: [definePlugin],
41-
externals: [...Object.keys(desktopDependencies), 'fsevents'],
41+
externals: [...Object.keys(desktopDependencies), ...Object.keys(desktopOptionalDependencies), 'fsevents'],
4242
node: {
4343
/**
4444
* Disables webpack processing of __dirname and __filename, so it works like in node

cspell.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"Aeroplan",
1313
"águero",
1414
"Aircall",
15+
"Airplus",
1516
"airshipconfig",
1617
"airside",
1718
"Amal",
@@ -294,6 +295,7 @@
294295
"inputmethod",
295296
"instancetype",
296297
"Intacct",
298+
"INTECOMS",
297299
"intenthandler",
298300
"ionatan",
299301
"iOSQRCode",
@@ -326,6 +328,7 @@
326328
"killall",
327329
"kilometres",
328330
"kilometre",
331+
"Kort",
329332
"Kowalski",
330333
"Krasoń",
331334
"labelledby",
@@ -396,6 +399,7 @@
396399
"Navan",
397400
"navattic",
398401
"navigations",
402+
"NBSA",
399403
"nbta",
400404
"ndkversion",
401405
"Nederlands",

desktop/ELECTRON_EVENTS.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const ELECTRON_EVENTS = {
1515
DOWNLOAD_CANCELED: 'download-canceled',
1616
SILENT_UPDATE: 'silent-update',
1717
OPEN_LOCATION_SETTING: 'open-location-setting',
18+
CHECK_LOCATION_PERMISSION: 'check-location-permission',
1819
} as const;
1920

2021
export default ELECTRON_EVENTS;

desktop/contextBridge.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const WHITELIST_CHANNELS_RENDERER_TO_MAIN = [
1919
ELECTRON_EVENTS.DOWNLOAD,
2020
ELECTRON_EVENTS.SILENT_UPDATE,
2121
ELECTRON_EVENTS.OPEN_LOCATION_SETTING,
22+
ELECTRON_EVENTS.CHECK_LOCATION_PERMISSION,
2223
] as const;
2324

2425
const WHITELIST_CHANNELS_MAIN_TO_RENDERER = [

desktop/entitlements.mac.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
<true/>
77
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
88
<true/>
9+
<key>com.apple.security.location</key>
10+
<true/>
911
</dict>
1012
</plist>

0 commit comments

Comments
 (0)