You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/fenix.md
+23-16Lines changed: 23 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,50 +2,57 @@
2
2
3
3
It is sometimes useful to test AMO with a Fenix build pointing to -dev or -stage given the tight integration between these two components. We describe how to construct a custom Fenix build below.
4
4
5
-
The first step is to get a working Android development environment. The easiest way is to install [Android Studio](https://developer.android.com/studio). Follow the [Fenix build instructions](https://github.com/mozilla-mobile/fenix#build-instructions) to get the Fenix code and construct a debug build (which will download the dependencies and compile the code).
5
+
The first step is to get a working Android development environment. The easiest way is to install [Android Studio](https://developer.android.com/studio). Follow the [Fenix build instructions](https://github.com/mozilla-mobile/firefox-android/tree/main/fenix) to get the Fenix code and construct a debug build (which will download the dependencies and compile the code).
6
6
7
-
Android Studio provides virtual devices _via_ the [AVD Manager](https://developer.android.com/studio/run/managing-avds) in case you do not have a real Android-compatible device. In order to run the Fenix debug build created before, either configure a new virtual device or use your own device, then run the following command in the Fenix root directory:
7
+
Android Studio provides virtual devices _via_ the [AVD Manager](https://developer.android.com/studio/run/managing-avds) in case you do not have a real Android-compatible device. In order to run the Fenix debug build created before, either configure a new virtual device or use your own device, then run the following command in the Fenix directory (inside the `firefox-android` repository):
8
8
9
9
```
10
-
$ ./gradlew installDebug
10
+
$ cd /path/to/firefox-android/fenix/
11
+
$ ./gradlew installFenixDebug
11
12
```
12
13
13
14
For more information, you can find more information on this page: https://developer.android.com/studio/build/building-cmdline#RunningOnDevice
14
15
15
16
## Custom build for AMO
16
17
17
-
Once you ensured that you can compile, install and run a debug Fenix build, let's update the build configuration for AMO -stage. Only a few values have to be changed in the `app/build.gradle` file as shown below:
18
+
Once you ensured that you can compile, install and run a debug Fenix build, let's update the build configuration for AMO -stage. Only a few values have to be changed in the `/path/to/firefox-android/fenix/app/build.gradle` file as shown below:
You may want to use your own values for `AMO_COLLECTION_USER` and `AMO_COLLECTION_NAME`. These values are used to determine which add-ons can be installed in Fenix based on an AMO collection. In this diff above, the ["fenix" collection](https://addons.allizom.org/en-US/firefox/collections/11686491/fenix/) is owned by [willdurand](https://github.com/willdurand).
44
50
45
51
Recompile and install the custom build with the following command:
46
52
47
53
```
48
-
$ ./gradlew installDebug
54
+
$ cd /path/to/firefox-android/fenix/
55
+
$ ./gradlew installFenixDebug
49
56
```
50
57
51
58
The last step is to configure some prefs to be able to install -dev/-stage add-ons. Open `about:config` in your Fenix custom build and create/update the following prefs:
@@ -55,4 +62,4 @@ The last step is to configure some prefs to be able to install -dev/-stage add-o
55
62
56
63
You should now be able to install add-ons from https://addons.allizom.org/ based on the list specified above.
57
64
58
-
Note: the commands above usually output different APKs for different architectures. All generated APKs can be found in `app/build/outputs/apk/debug` in case you need to share them.
65
+
Note: the commands above usually output different APKs for different architectures. All generated APKs can be found in `fenix/app/build/outputs/apk/fenix/debug` in case you need to share them.
0 commit comments