Mobile/GeckoView: Difference between revisions

https://bugzilla.mozilla.org/show_bug.cgi?id=1508976 introduced a single multi-architecture AAR for GeckoView, but our Quick Start guide still refers to setting up multiple architectures. This needs to be updated to reflect the existing requirements.
(Fixing link to contributor quick start guide)
(https://bugzilla.mozilla.org/show_bug.cgi?id=1508976 introduced a single multi-architecture AAR for GeckoView, but our Quick Start guide still refers to setting up multiple architectures. This needs to be updated to reflect the existing requirements.)
Line 27: Line 27:


=== Configure Gradle ===
=== Configure Gradle ===
You need to add or edit four stanzas inside your module's <code>build.gradle</code> file.


'''1. Set the GeckoView version'''
'''1. Set the GeckoView version'''
Line 36: Line 34:
ext {
ext {
     geckoviewChannel = "nightly"
     geckoviewChannel = "nightly"
     geckoviewVersion = "64.0.20180927100037"
     geckoviewVersion = "70.0.20190712095934"
}
}
</syntaxhighlight>
</syntaxhighlight>
Line 49: Line 47:
</syntaxhighlight>
</syntaxhighlight>


'''3. Configure build flavors'''
'''3. Configure Java 8 support'''
 
''Note: Until we resolve [https://bugzilla.mozilla.org/show_bug.cgi?id=1485045 Bug 1485045], you must configure a separate build variant for each CPU architecture.''


<syntaxhighlight lang="Groovy">
<syntaxhighlight lang="Groovy">
Line 61: Line 57:
         sourceCompatibility JavaVersion.VERSION_1_8
         sourceCompatibility JavaVersion.VERSION_1_8
         targetCompatibility JavaVersion.VERSION_1_8
         targetCompatibility JavaVersion.VERSION_1_8
    }
    flavorDimensions "abi"
    productFlavors {
        x86    { dimension "abi" }
        x86_64  { dimension "abi" }
        arm    { dimension "abi" }
        aarch64 { dimension "abi" }
     }
     }
}
}
Line 78: Line 65:
dependencies {
dependencies {
     // ...
     // ...
 
     implementation "org.mozilla.geckoview:geckoview-${geckoviewChannel}:${geckoviewVersion}"  
     x86Implementation    "org.mozilla.geckoview:geckoview-${geckoviewChannel}-x86:${geckoviewVersion}"
    x86_64Implementation  "org.mozilla.geckoview:geckoview-${geckoviewChannel}-x86_64:${geckoviewVersion}"
    armImplementation    "org.mozilla.geckoview:geckoview-${geckoviewChannel}-armeabi-v7a:${geckoviewVersion}"
    aarch64Implementation "org.mozilla.geckoview:geckoview-${geckoviewChannel}-arm64-v8a:${geckoviewVersion}"
}
}
</syntaxhighlight>
</syntaxhighlight>
Line 141: Line 124:


'''Products / Examples'''
'''Products / Examples'''
* [https://blog.mozilla.org/futurereleases/2019/06/27/reinventing-firefox-for-android-a-preview/ Firefox Preview] ([https://github.com/mozilla-mobile/fenix GitHub])
* [https://blog.mozilla.org/blog/2018/09/18/firefox-reality-now-available/ Firefox Reality] ([https://github.com/mozillareality/firefoxreality GitHub])
* [https://blog.mozilla.org/blog/2018/09/18/firefox-reality-now-available/ Firefox Reality] ([https://github.com/mozillareality/firefoxreality GitHub])
* [https://www.mozilla.org/firefox/mobile/#focus Firefox Focus] ([https://github.com/mozilla-mobile/focus-android/ GitHub])
* [https://www.mozilla.org/firefox/mobile/#focus Firefox Focus] ([https://github.com/mozilla-mobile/focus-android/ GitHub])
1

edit