diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /mobile/android/fenix/docs/substituting-local-gv.md | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mobile/android/fenix/docs/substituting-local-gv.md')
-rw-r--r-- | mobile/android/fenix/docs/substituting-local-gv.md | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/mobile/android/fenix/docs/substituting-local-gv.md b/mobile/android/fenix/docs/substituting-local-gv.md new file mode 100644 index 0000000000..27605c3caa --- /dev/null +++ b/mobile/android/fenix/docs/substituting-local-gv.md @@ -0,0 +1,76 @@ +# Substituting local GeckoView + +### 1. Manually publish local GeckoView to local Maven + +Publish our local GeckoView to our local maven: +```sh +./mach build && ./mach gradle \ + geckoview:publishWithGeckoBinariesDebugPublicationToMavenLocal \ + exoplayer2:publishDebugPublicationToMavenLocal +``` + +:warning: **This needs to be run every time you make changes.** :warning: + +You need to copy the version in the logs or run: +```sh +./mach build | grep version +``` +(ex. `115.0.20230511122045-SNAPSHOT`) + +### 2. Modify Fenix to consume local GV +Update the build.gradle and Gecko.kt file in Fenix (see the diffs below). Remember to update the GV version with the version you found in step 2! + +*fenix/build.gradle* +```diff +diff --git a/fenix/build.gradle b/fenix/build.gradle +index 6a635a4818..4c8cc28995 100644 +--- a/fenix/build.gradle ++++ b/fenix/build.gradle +@@ -5,6 +5,7 @@ import org.mozilla.fenix.gradle.tasks.GithubDetailsTask + buildscript { + // This logic is duplicated in the allprojects block: I don't know how to fix that. + repositories { ++ mavenLocal() + maven { + name "Mozilla Nightly" + url "https://nightly.maven.mozilla.org/maven2" +@@ -90,6 +91,7 @@ plugins { + allprojects { + // This logic is duplicated in the buildscript block: I don't know how to fix that. + repositories { ++ mavenLocal() + maven { + name "Mozilla Nightly" + url "https://nightly.maven.mozilla.org/maven2" +``` +*Gecko.kt* +```diff +diff --git a/android-components/plugins/dependencies/src/main/java/Gecko.kt b/android-components/plugins/dependencies/src/main/java/Gecko.kt +index bed3fb0161..2d3a19a96e 100644 +--- a/android-components/plugins/dependencies/src/main/java/Gecko.kt ++++ b/android-components/plugins/dependencies/src/main/java/Gecko.kt +@@ -9,7 +9,7 @@ object Gecko { + /** + * GeckoView Version. + */ +- const val version = "115.0.20230511131014" ++ const val version = "115.0.20230511122045-SNAPSHOT" + + /** + * GeckoView channel +@@ -23,7 +23,7 @@ object Gecko { + enum class GeckoChannel( + val artifactName: String, + ) { +- NIGHTLY("geckoview-nightly-omni"), ++ NIGHTLY("geckoview-default-omni"), + BETA("geckoview-beta-omni"), + RELEASE("geckoview-omni"), + } + +``` + +### 3. Build fenix with local GV +Now sync your gradle changes and build! + +An easy way to confirm you are using a local GV is switching your Android Studio project tool window to "Project" and looking in the root directory called "External Libraries" for "GeckoView". You should see something like `Gradle: org.mozilla.geckoview-default-omni:115.0.20230511122045-SNAPSHOT@aar` |