Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local Gecko builds are not used by default when building a package #890

Closed
felipeerias opened this issue Aug 3, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@felipeerias
Copy link
Contributor

In our current build configuration, the local Gecko build is not actually used when building a package.

Here is a detailed explanation:

The group of dependencies under org.mozilla.geckoview contains several modules, which we define in the file versions.gradle.

For example, for ARM64 there is a "nightly" module geckoview-nightly-arm64-v8a and a "release" module geckoview-arm64-v8a.

In the project's build.gradle, we select one of those variants. At the moment, by default we use the "release" module geckoview-arm64-v8a:

    def branch = "release" // "release", "nightly" or "beta"
    geckoImplementation deps.gecko_view."${branch}_x86_64"
    geckoImplementation deps.gecko_view."${branch}_arm64"

However, we also support local Gecko builds. In order to do that, we call a script provided by Gecko: substitute-local-geckoview.gradle

This script replaces dependencies to Gecko modules with the local Gecko build. Unexpectedly, it will only replace modules that are of the "nightly" or "beta" types:

    def geckoviewModules = [
        'geckoview-nightly',
        'geckoview-nightly-armeabi-v7a',
        'geckoview-nightly-arm64-v8a',
        'geckoview-nightly-x86',
        'geckoview-nightly-x86_64',
        'geckoview-beta',
        'geckoview-beta-armeabi-v7a',
        'geckoview-beta-arm64-v8a',
        'geckoview-beta-x86',
        'geckoview-beta-x86_64',
    ]
    ...
                    if (group == 'org.mozilla.geckoview'
                          && (geckoviewModules.contains(module)

The script will not substitute a "release" module.

The simplest workaround for this problem is to use def branch = "nightly", but we should look for a better solution.

@felipeerias felipeerias added the bug Something isn't working label Aug 3, 2023
@HollowMan6
Copy link
Collaborator

FYI, here's our previous discussion.

@HollowMan6
Copy link
Collaborator

#882 (comment)

felipeerias added a commit that referenced this issue Aug 4, 2023
We need to use the "nightly" Gecko module so it can be replaced
by the script substitute-local-geckoview.gradle

See #890
felipeerias added a commit that referenced this issue Aug 4, 2023
We need to use the "nightly" Gecko module so it can be replaced
by the script substitute-local-geckoview.gradle

See #890
felipeerias added a commit that referenced this issue Aug 4, 2023
We need to use the "nightly" Gecko module so it can be replaced
by the script substitute-local-geckoview.gradle

See #890
felipeerias added a commit that referenced this issue Aug 4, 2023
We need to use the "nightly" Gecko module so it can be replaced
by the script substitute-local-geckoview.gradle

See #890
felipeerias added a commit that referenced this issue Aug 4, 2023
We need to use the "nightly" Gecko module so it can be replaced
by the script substitute-local-geckoview.gradle

See #890
svillar pushed a commit that referenced this issue Aug 4, 2023
We need to use the "nightly" Gecko module so it can be replaced
by the script substitute-local-geckoview.gradle

See #890
@svillar svillar closed this as completed Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants