Skip to content

Commit 8de63d1

Browse files
committed
Merge branch 'main' of github.com:MetaMask/metamask-mobile into chore-mul-1132-remove-per-dapp-selected-network-feature-flag
2 parents 62ab000 + 4ac8773 commit 8de63d1

File tree

458 files changed

+35560
-8868
lines changed

Some content is hidden

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

458 files changed

+35560
-8868
lines changed

.detoxrc.js

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,12 @@ module.exports = {
6565
},
6666
'ios.sim.main.ci': {
6767
device: 'ios.simulator',
68-
app: 'ios.debug',
69-
}
68+
app: 'ios.main.release',
69+
},
70+
'ios.sim.flask.ci': {
71+
device: 'ios.simulator',
72+
app: 'ios.flask.release',
73+
},
7074
},
7175
devices: {
7276
'ios.simulator': {
@@ -110,42 +114,44 @@ module.exports = {
110114
'ios.main.release': {
111115
type: 'ios.app',
112116
binaryPath:
113-
'ios/build/Build/Products/Release-iphonesimulator/MetaMask.app',
114-
build: `yarn build:ios:main:e2e`,
117+
process.env.PREBUILT_IOS_APP_PATH || 'ios/build/Build/Products/Release-iphonesimulator/MetaMask.app',
118+
build: `export CONFIGURATION="Release" && yarn build:ios:main:e2e`,
115119
},
116120
'ios.flask.debug': {
117121
type: 'ios.app',
118122
binaryPath:
119-
'ios/build/Build/Products/Debug-iphonesimulator/MetaMask-Flask.app',
120-
build: 'yarn start:ios:e2e:flask',
123+
process.env.PREBUILT_IOS_APP_PATH || 'ios/build/Build/Products/Debug-iphonesimulator/MetaMask-Flask.app',
124+
build: 'export CONFIGURATION="Debug" && yarn build:ios:flask:e2e',
121125
},
122126
'ios.flask.release': {
123127
type: 'ios.app',
124128
binaryPath:
125-
'ios/build/Build/Products/Release-iphonesimulator/MetaMask-Flask.app',
126-
build: `yarn build:ios:flask:e2e`,
129+
process.env.PREBUILT_IOS_APP_PATH || 'ios/build/Build/Products/Release-iphonesimulator/MetaMask-Flask.app',
130+
build: `export CONFIGURATION="Release" && yarn build:ios:flask:e2e`,
127131
},
128132
'android.debug': {
129133
type: 'android.apk',
130134
binaryPath: process.env.PREBUILT_ANDROID_APK_PATH || 'android/app/build/outputs/apk/prod/debug/app-prod-debug.apk',
131135
testBinaryPath: process.env.PREBUILT_ANDROID_TEST_APK_PATH,
132-
build: 'yarn start:android:e2e',
136+
build: 'export CONFIGURATION="Debug" && yarn build:android:main:e2e',
133137
},
134-
'android.flask.debug': {
138+
'android.release': {
135139
type: 'android.apk',
136-
binaryPath: 'android/app/build/outputs/apk/flask/debug/app-flask-debug.apk',
137-
testBinaryPath: 'android/app/build/outputs/apk/androidTest/flask/debug/app-flask-debug-androidTest.apk',
138-
build: 'yarn start:android:e2e:flask',
140+
binaryPath: process.env.PREBUILT_ANDROID_APK_PATH || 'android/app/build/outputs/apk/prod/release/app-prod-release.apk',
141+
testBinaryPath: process.env.PREBUILT_ANDROID_TEST_APK_PATH,
142+
build: `export CONFIGURATION="Release" && yarn build:android:main:e2e`,
139143
},
140-
'android.release': {
144+
'android.flask.debug': {
141145
type: 'android.apk',
142-
binaryPath: 'android/app/build/outputs/apk/prod/release/app-prod-release.apk',
143-
build: `yarn build:android:main:e2e`,
146+
binaryPath: process.env.PREBUILT_ANDROID_APK_PATH || 'android/app/build/outputs/apk/flask/debug/app-flask-debug.apk',
147+
testBinaryPath: process.env.PREBUILT_ANDROID_TEST_APK_PATH,
148+
build: 'export CONFIGURATION="Debug" && yarn build:android:flask:e2e',
144149
},
145150
'android.flask.release': {
146151
type: 'android.apk',
147-
binaryPath: 'android/app/build/outputs/apk/flask/release/app-flask-release.apk',
148-
build: `yarn build:android:flask:e2e`,
152+
binaryPath: process.env.PREBUILT_ANDROID_APK_PATH || 'android/app/build/outputs/apk/flask/release/app-flask-release.apk',
153+
testBinaryPath: process.env.PREBUILT_ANDROID_TEST_APK_PATH,
154+
build: `export CONFIGURATION="Release" && yarn build:android:flask:e2e`,
149155
},
150156
},
151157
};

.github/CODEOWNERS

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ app/core/Engine/index.ts @MetaMask/mobile-pla
4040
app/core/Engine/README.md @MetaMask/mobile-platform
4141
app/core/Engine/types.ts @MetaMask/mobile-platform
4242
app/core/Engine/controllers/remote-feature-flag-controller/ @MetaMask/mobile-platform
43-
app/core/DeeplinkManager @MetaMask/mobile-platform
44-
app/core/DeeplinkManager/Handlers/handlePerpsUrl.ts @MetaMask/perps
43+
app/core/DeeplinkManager @MetaMask/mobile-platform
44+
scripts/build.sh @MetaMask/mobile-platform
4545

4646
# Platform & Snaps Code Fencing File
4747
metro.transform.js @MetaMask/mobile-platform @MetaMask/core-platform
@@ -145,6 +145,7 @@ app/components/UI/Perps/ @MetaMask/perps
145145
app/components/UI/WalletAction/*perps* @MetaMask/perps
146146
app/core/Engine/controllers/perps-controller @MetaMask/perps
147147
app/core/Engine/messengers/perps-controller-messenger @MetaMask/perps
148+
app/core/DeeplinkManager/Handlers/handlePerpsUrl.ts @MetaMask/perps
148149
**/Perps/** @MetaMask/perps
149150
**/perps/** @MetaMask/perps
150151

.github/workflows/build-android-e2e.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
runs-on: ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg
3636
env:
3737
GRADLE_USER_HOME: /home/admin/_work/.gradle
38+
CACHE_GENERATION: v1 # Increment this to bust the cache (v1, v2, v3, etc.)
3839
outputs:
3940
apk-uploaded: ${{ steps.upload-apk.outcome == 'success' }}
4041
aab-uploaded: ${{ steps.upload-aab.outcome == 'success' }}
@@ -63,16 +64,14 @@ jobs:
6364

6465
- name: Cache Gradle dependencies
6566
uses: cirruslabs/cache@v4
67+
id: gradle-cache-restore
68+
env:
69+
GRADLE_CACHE_VERSION: 1
6670
with:
6771
path: |
68-
/home/runner/_work/.gradle/caches
69-
/home/runner/_work/.gradle/wrapper
70-
/home/admin/_work/.gradle/caches
71-
/home/admin/_work/.gradle/wrapper
72-
android/.gradle
73-
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
74-
restore-keys: |
75-
gradle-${{ runner.os }}-
72+
~/_work/.gradle/caches
73+
~/_work/.gradle/wrapper
74+
key: gradle-${{ env.GRADLE_CACHE_VERSION }}-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
7675

7776
- name: Setup project dependencies with retry
7877
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2
@@ -115,24 +114,24 @@ jobs:
115114
fi
116115
117116
- name: Check and restore cached APKs if Fingerprint is found
118-
id: cache-restore
117+
id: apk-cache-restore
119118
uses: cirruslabs/cache@v4
120119
with:
121120
path: |
122121
${{ steps.determine-target-paths.outputs.apk-target-path }}/${{ steps.determine-target-paths.outputs.artifact_name }}.apk
123122
${{ steps.determine-target-paths.outputs.test-apk-target-path }}/${{ steps.determine-target-paths.outputs.artifact_name }}-androidTest.apk
124123
${{ steps.determine-target-paths.outputs.aab-target-path }}/${{ steps.determine-target-paths.outputs.artifact_name }}.aab
125-
key: android-apk-${{ inputs.build_type }}-${{ steps.generate-fingerprint.outputs.fingerprint }}
124+
key: android-apk-${{ inputs.build_type }}-${{ env.CACHE_GENERATION }}-${{ steps.generate-fingerprint.outputs.fingerprint }}
126125
restore-keys: |
127-
android-apk-${{ inputs.build_type }}-
126+
android-apk-${{ inputs.build_type }}-${{ env.CACHE_GENERATION }}-
128127
android-apk-
129128
130129
- name: Build Android E2E APKs
131-
if: ${{ steps.cache-restore.outputs.cache-hit != 'true' }}
130+
if: ${{ steps.apk-cache-restore.outputs.cache-hit != 'true' || steps.gradle-cache-restore.outputs.cache-hit != 'true' }}
132131
run: |
133132
echo "🏗 Building Android E2E APKs..."
134133
export NODE_OPTIONS="--max-old-space-size=8192"
135-
# cp android/gradle.properties.github android/gradle.properties - Build for all apps to stabilize e2e
134+
cp android/gradle.properties.github android/gradle.properties
136135
yarn build:android:${{ inputs.build_type }}:e2e
137136
shell: bash
138137
env:
@@ -179,7 +178,7 @@ jobs:
179178
MM_INFURA_PROJECT_ID: ${{ secrets.MM_INFURA_PROJECT_ID }}
180179

181180
- name: Repack APK with JS updates using @expo/repack-app
182-
if: ${{ steps.cache-restore.outputs.cache-hit == 'true' }}
181+
if: ${{ steps.apk-cache-restore.outputs.cache-hit == 'true' && steps.gradle-cache-restore.outputs.cache-hit == 'true' }}
183182
run: |
184183
echo "📦 Repacking APK with updated JavaScript bundle using @expo/repack-app..."
185184
# Use the optimized repack script which uses @expo/repack-app
@@ -230,14 +229,14 @@ jobs:
230229

231230
# Cache build artifacts with the pre-build fingerprint
232231
- name: Cache build artifacts
233-
if: ${{ steps.cache-restore.outputs.cache-hit != 'true' }}
232+
if: ${{ steps.apk-cache-restore.outputs.cache-hit != 'true' || steps.gradle-cache-restore.outputs.cache-hit != 'true' }}
234233
uses: cirruslabs/cache@v4
235234
with:
236235
path: |
237236
${{ steps.determine-target-paths.outputs.apk-target-path }}/${{ steps.determine-target-paths.outputs.artifact_name }}.apk
238237
${{ steps.determine-target-paths.outputs.test-apk-target-path }}/${{ steps.determine-target-paths.outputs.artifact_name }}-androidTest.apk
239238
${{ steps.determine-target-paths.outputs.aab-target-path }}/${{ steps.determine-target-paths.outputs.artifact_name }}.aab
240-
key: android-apk-${{ inputs.build_type }}-${{ steps.generate-fingerprint.outputs.fingerprint }}
239+
key: android-apk-${{ inputs.build_type }}-${{ env.CACHE_GENERATION }}-${{ steps.generate-fingerprint.outputs.fingerprint }}
241240

242241
- name: Upload Android APK
243242
id: upload-apk

0 commit comments

Comments
 (0)