first commit
parent
69f2dd41c4
commit
89ae956b10
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
|||
# Maven group ID used for all components
|
||||
componentsGroupId: "org.mozilla.components"
|
||||
|
||||
# Synchronized build configuration for all modules
|
||||
compileSdkVersion: 34
|
||||
minSdkVersion: 21
|
||||
targetSdkVersion: 33
|
|
@ -0,0 +1,15 @@
|
|||
# This is an .editorconfig that ktlint will "stop" at.
|
||||
|
||||
# If an .editorconfig file exists in any parent directory of the checkout
|
||||
# directory, ktlint will fail because it uses those settings to determine what
|
||||
# the indentation should be.
|
||||
|
||||
root = True
|
||||
|
||||
[*.kt]
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
|
||||
ij_kotlin_allow_trailing_comma_on_call_site=true
|
||||
ij_kotlin_allow_trailing_comma=true
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# Treat generated API docs as binary. We do not want them to pollute
|
||||
# our diffs.
|
||||
docs/api/**/* -text -diff linguist-generated=true
|
||||
|
||||
# Treat the public suffix list file as text
|
||||
**/publicsuffixes diff
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
The changelog is now hosted here:
|
||||
https://mozilla-mobile.github.io/android-components/changelog/
|
|
@ -0,0 +1,148 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# This CODEOWNERS file defines individuals or teams that are responsible
|
||||
# for code in this repository. Code owners are automatically requested
|
||||
# for review when someone opens a pull request that modifies code that
|
||||
# they own. Order is important; the last matching pattern takes the most
|
||||
# precedence.
|
||||
# A CODEOWNERS file uses a pattern that follows the same rules used in
|
||||
# gitignore files. The pattern is followed by one or more GitHub usernames
|
||||
# or team names using the standard @username or @org/team-name format.
|
||||
# You can also refer to a user by an email address that has been added
|
||||
# to their GitHub account, for example user@example.com.
|
||||
# https://help.github.com/articles/about-codeowners/
|
||||
|
||||
|
||||
# By default the Android Components team will be the owner for everything in
|
||||
# the repo. Unless a later match takes precedence.
|
||||
* @mozilla-mobile/act
|
||||
|
||||
# Changelog is reviewable by anyone on any team
|
||||
/docs/changelog.md @mozilla-mobile
|
||||
|
||||
# Release Engineering pipeline
|
||||
/.cron.yml @mozilla-mobile/releng @mozilla-mobile/act
|
||||
/.taskcluster.yml @mozilla-mobile/releng @mozilla-mobile/act
|
||||
/automation/ @mozilla-mobile/act
|
||||
/taskcluster/ @mozilla-mobile/releng @mozilla-mobile/act
|
||||
|
||||
/components/browser/awesomebar/ @mozilla-mobile/act
|
||||
/components/browser/domains/ @csadilek
|
||||
/components/browser/engine-gecko-beta/ @csadilek @amejia481
|
||||
/components/browser/engine-gecko-nightly/ @csadilek @amejia481
|
||||
/components/browser/engine-gecko/ @csadilek @amejia481
|
||||
/components/browser/engine-system/ @amejia481
|
||||
/components/browser/errorpages/ @mozilla-mobile/act
|
||||
/components/browser/icons/ @mozilla-mobile/act
|
||||
/components/browser/menu/ @mozilla-mobile/act
|
||||
/components/browser/menu2/ @jonalmeida
|
||||
/components/browser/search/ @mozilla-mobile/act
|
||||
/components/browser/state/ @csadilek
|
||||
/components/browser/storage-sync/ @mozilla-mobile/act
|
||||
/components/browser/tabstray/ @jonalmeida
|
||||
/components/browser/thumbnails/ @jonalmeida @gabrielluong
|
||||
/components/browser/toolbar/ @mozilla-mobile/act
|
||||
|
||||
/components/concept/awesomebar/ @csadilek
|
||||
/components/concept/base/ @mozilla-mobile/act
|
||||
/components/concept/engine/ @csadilek
|
||||
/components/concept/fetch/ @csadilek
|
||||
/components/concept/menu/ @mozilla-mobile/act
|
||||
/components/concept/push/ @jonalmeida
|
||||
/components/concept/storage/ @mozilla-mobile/act
|
||||
/components/concept/sync/ @mozilla-mobile/act
|
||||
/components/concept/tabstray/ @jonalmeida
|
||||
/components/concept/toolbar/ @mozilla-mobile/act
|
||||
|
||||
/components/feature/accounts-push/ @jonalmeida
|
||||
/components/feature/accounts/ @mozilla-mobile/act
|
||||
/components/feature/addons/ @csadilek @amejia481
|
||||
/components/feature/app-links/ @rocketsroger
|
||||
/components/feature/autofill/ @mozilla-mobile/act
|
||||
/components/feature/awesomebar/ @csadilek
|
||||
/components/feature/containers/ @gabrielluong
|
||||
/components/feature/contextmenu/ @mozilla-mobile/act
|
||||
/components/feature/customtabs/ @jonalmeida
|
||||
/components/feature/downloads/ @Amejia481 @csadilek
|
||||
/components/feature/findinpage/ @Amejia481
|
||||
/components/feature/intent/ @mozilla-mobile/act
|
||||
/components/feature/media/ @rocketsroger
|
||||
/components/feature/privatemode/ @mozilla-mobile/act
|
||||
/components/feature/prompts/ @amejia481
|
||||
/components/feature/push/ @jonalmeida
|
||||
/components/feature/pwa/ @mozilla-mobile/act
|
||||
/components/feature/qr/ @csadilek
|
||||
/components/feature/readerview/ @csadilek
|
||||
/components/feature/recentlyclosed/ @mozilla-mobile/act
|
||||
/components/feature/search/ @mozilla-mobile/act
|
||||
/components/feature/session/ @csadilek
|
||||
/components/feature/share/ @mozilla-mobile/act
|
||||
/components/feature/sitepermissions/ @amejia481
|
||||
/components/feature/syncedtabs/ @jonalmeida
|
||||
/components/feature/tab-collections/ @mozilla-mobile/act
|
||||
/components/feature/tabs/ @jonalmeida
|
||||
/components/feature/toolbar/ @mozilla-mobile/act
|
||||
/components/feature/top-sites/ @gabrielluong
|
||||
/components/feature/webcompat-reporter/ @mozilla-mobile/Webcompat
|
||||
/components/feature/webcompat/ @mozilla-mobile/Webcompat
|
||||
/components/feature/webnotifications/ @jonalmeida @rocketsroger
|
||||
|
||||
/components/lib/crash/ @rocketsroger
|
||||
/components/lib/dataprotect/ @mozilla-mobile/act
|
||||
/components/lib/fetch-httpurlconnection/ @mozilla-mobile/act
|
||||
/components/lib/fetch-okhttp/ @mozilla-mobile/act
|
||||
/components/lib/jexl/ @mozilla-mobile/act
|
||||
/components/lib/publicsuffixlist/ @mozilla-mobile/act
|
||||
/components/lib/push-firebase/ @jonalmeida
|
||||
/components/lib/state/ @csadilek
|
||||
|
||||
/components/service/digitalassetlinks/ @mozilla-mobile/act
|
||||
/components/service/experiments/ @mozilla-mobile/telemetry
|
||||
/components/service/firefox-accounts/ @mozilla-mobile/act
|
||||
/components/service/fretboard/ @mozilla-mobile/act
|
||||
/components/service/glean/ @mozilla-mobile/telemetry
|
||||
/components/service/location/ @mozilla-mobile/act
|
||||
/components/service/nimbus/ @mozilla-mobile/telemetry @mozilla-mobile/ast
|
||||
/components/service/pocket/ @Mugurell
|
||||
/components/service/sync-autofill/ @gabrielluong
|
||||
/components/service/sync-logins/ @mozilla-mobile/act
|
||||
|
||||
/components/support/android-test/ @amejia481
|
||||
/components/support/base/ @amejia481
|
||||
/components/support/images/ @mozilla-mobile/act
|
||||
/components/support/ktx/ @amejia481
|
||||
/components/support/locale/ @amejia481
|
||||
/components/support/rusthttp/ @mozilla-mobile/ast
|
||||
/components/support/rustlog/ @mozilla-mobile/ast
|
||||
/components/support/test-appservices/ @mozilla-mobile/act
|
||||
/components/support/test-libstate/ @csadilek
|
||||
/components/support/test/ @amejia481
|
||||
/components/support/utils/ @mozilla-mobile/act
|
||||
/components/support/webextensions/ @csadilek @amejia481
|
||||
|
||||
/components/tooling/detekt/
|
||||
/components/tooling/fetch-tests/ @csadilek
|
||||
/components/tooling/lint/ @mozilla-mobile/act
|
||||
|
||||
/components/ui/autocomplete/ @mozilla-mobile/act
|
||||
/components/ui/colors/ @mozilla-mobile/act
|
||||
/components/ui/fonts/ @mozilla-mobile/act
|
||||
/components/ui/icons/ @mozilla-mobile/act
|
||||
/components/ui/tabcounter/ @mozilla-mobile/act
|
||||
/components/ui/widgets/ @mozilla-mobile/act
|
||||
|
||||
/samples/browser/ @csadilek @amejia481
|
||||
/samples/crash/ @rocketsroger
|
||||
/samples/dataprotect/ @mozilla-mobile/act
|
||||
/samples/firefox-accounts/ @mozilla-mobile/act
|
||||
/samples/glean/ @mozilla-mobile/telemetry
|
||||
/samples/sync-logins/ @mozilla-mobile/act
|
||||
/samples/sync/ @mozilla-mobile/act
|
||||
/samples/toolbar/ @mozilla-mobile/act
|
||||
|
||||
# Bot owned files
|
||||
strings.xml @MickeyMoz
|
||||
Gecko.kt @MickeyMoz
|
||||
publicsuffixes @MickeyMoz
|
325
README.md
325
README.md
|
@ -0,0 +1,325 @@
|
|||
# Android components
|
||||
|
||||
[![Task Status](https://firefox-ci-tc.services.mozilla.com/api/github/v1/repository/mozilla-mobile/android-components/main/badge.svg)](https://firefox-ci-tc.services.mozilla.com/api/github/v1/repository/mozilla-mobile/android-components/main/latest)
|
||||
[![Mergify Status](https://img.shields.io/endpoint.svg?url=https://gh.mergify.io/badges/mozilla-mobile/android-components&style=flat)](https://mergify.io)
|
||||
[![chat.mozilla.org](https://img.shields.io/badge/chat-on%20matrix-51bb9c)](https://chat.mozilla.org/#/room/#android-components:mozilla.org)
|
||||
|
||||
_A collection of Android libraries to build browsers or browser-like applications._
|
||||
|
||||
ℹ️ For more information **[see the website](https://mozilla-mobile.github.io/android-components/)**.
|
||||
|
||||
A fully-featured reference browser implementation based on the components can be found in the [reference-browser repository](https://github.com/mozilla-mobile/reference-browser).
|
||||
|
||||
# Getting Involved
|
||||
|
||||
We encourage you to participate in this open source project. We love pull requests, bug reports, ideas, (security) code reviews or any kind of positive contribution.
|
||||
|
||||
Before you attempt to make a contribution please read the [Community Participation Guidelines](https://www.mozilla.org/en-US/about/governance/policies/participation/).
|
||||
|
||||
* Matrix: [android-components:mozilla.org chat room](https://chat.mozilla.org/#/room/#android-components:mozilla.org) ([How to connect](https://wiki.mozilla.org/Matrix#Connect_to_Matrix)).
|
||||
|
||||
* Localization happens on [Pontoon](https://pontoon.mozilla.org/projects/android-l10n/). Please get in touch with delphine (at) mozilla (dot) com directly for more information.
|
||||
|
||||
# Maven repository
|
||||
|
||||
All components are getting published on [maven.mozilla.org](https://maven.mozilla.org/).
|
||||
To use them, you need to add the following to your project's top-level build file, in the `allprojects` block (see e.g. the [reference-browser](https://github.com/mozilla-mobile/reference-browser/blob/main/build.gradle)):
|
||||
|
||||
```groovy
|
||||
repositories {
|
||||
maven {
|
||||
url "https://maven.mozilla.org/maven2"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Each module that uses a component needs to specify it in its build file, in the `dependencies` block. For example, to use the `Base` component (in the `support`) collection, you need:
|
||||
|
||||
```groovy
|
||||
dependencies {
|
||||
implementation 'org.mozilla.components:support-base:+'
|
||||
}
|
||||
```
|
||||
|
||||
## Nightly builds
|
||||
|
||||
Nightly builds are created every day from the `main` branch and published on [nightly.maven.mozilla.org](https://nightly.maven.mozilla.org).
|
||||
|
||||
# Components
|
||||
|
||||
* 🔴 **In Development** - Not ready to be used in shipping products.
|
||||
* ⚪ **Preview** - This component is almost/partially ready and can be tested in products.
|
||||
* 🔵 **Production ready** - Used by shipping products.
|
||||
|
||||
## Browser
|
||||
|
||||
High-level components for building browser(-like) apps.
|
||||
|
||||
* 🔵 [**Awesomebar**](components/browser/awesomebar/README.md) - A customizable [Awesome Bar](https://support.mozilla.org/en-US/kb/awesome-bar-search-firefox-bookmarks-history-tabs) implementation for browsers.
|
||||
|
||||
* 🔵 [**Domains**](components/browser/domains/README.md) Localized and customizable domain lists for auto-completion in browsers.
|
||||
|
||||
* 🔵 [**Engine-Gecko**](components/browser/engine-gecko/README.md) - *Engine* implementation based on [GeckoView](https://wiki.mozilla.org/Mobile/GeckoView).
|
||||
|
||||
* 🔵 [**Engine-System**](components/browser/engine-system/README.md) - *Engine* implementation based on the system's WebView.
|
||||
|
||||
* 🔵 [**Errorpages**](components/browser/errorpages/README.md) - Responsive browser error pages for Android apps.
|
||||
|
||||
* 🔵 [**Icons**](components/browser/icons/README.md) - A component for loading and storing website icons (like [Favicons](https://en.wikipedia.org/wiki/Favicon)).
|
||||
|
||||
* 🔵 [**Menu**](components/browser/menu/README.md) - A generic menu with customizable items primarily for browser toolbars.
|
||||
|
||||
* ⚪ [**Menu 2**](components/browser/menu2/README.md) - A generic menu with customizable items primarily for browser toolbars.
|
||||
|
||||
* 🔵 [**Session-Storage**](components/browser/session-storage/README.md) - Component for saving and restoring the browser state.
|
||||
|
||||
* 🔵 [**State**](components/browser/state/README.md) - Component for maintaining the centralized state of the browser and its components.
|
||||
|
||||
* 🔵 [**Storage-Sync**](components/browser/storage-sync/README.md) - A syncable implementation of browser storage backed by [application-services' Places lib](https://github.com/mozilla/application-services).
|
||||
|
||||
* 🔵 [**Tabstray**](components/browser/tabstray/README.md) - A customizable tabs tray for browsers.
|
||||
|
||||
* 🔵 [**Thumbnails**](components/browser/thumbnails/README.md) - A component for loading and storing website thumbnails (screenshot of the website).
|
||||
|
||||
* 🔵 [**Toolbar**](components/browser/toolbar/README.md) - A customizable toolbar for browsers.
|
||||
|
||||
## Concept
|
||||
|
||||
_API contracts and abstraction layers for browser components._
|
||||
|
||||
* 🔵 [**Awesomebar**](components/concept/awesomebar/README.md) - An abstract definition of an awesome bar component.
|
||||
|
||||
* 🔵 [**Engine**](components/concept/engine/README.md) - Abstraction layer that allows hiding the actual browser engine implementation.
|
||||
|
||||
* 🔵 [**Fetch**](components/concept/fetch/README.md) - An abstract definition of an HTTP client for fetching resources.
|
||||
|
||||
* 🔵 [**Push**](components/concept/push/README.md) - An abstract definition of a push service component.
|
||||
|
||||
* 🔵 [**Storage**](components/concept/storage/README.md) - Abstract definition of a browser storage component.
|
||||
|
||||
* 🔵 [**Tabstray**](components/concept/tabstray/README.md) - Abstract definition of a tabs tray component.
|
||||
|
||||
* 🔵 [**Toolbar**](components/concept/toolbar/README.md) - Abstract definition of a browser toolbar component.
|
||||
|
||||
## Feature
|
||||
|
||||
_Combined components to implement feature-specific use cases._
|
||||
|
||||
* 🔵 [**Accounts**](components/feature/accounts/README.md) - A component that connects an FxaAccountManager from [service-firefox-accounts](components/service/firefox-accounts/README.md) with [feature-tabs](components/feature/tabs/README.md) in order to facilitate authentication flows.
|
||||
|
||||
* 🔵 [**Accounts Push**](components/feature/accounts-push/README.md) - Feature of use cases for FxA Account that work with push support.
|
||||
|
||||
* 🔵 [**Autofill**](components/feature/autofill/README.md) - A component that provides support for Android's Autofill framework.
|
||||
|
||||
* 🔵 [**Awesomebar**](components/feature/awesomebar/README.md) - A component that connects a [concept-awesomebar](components/concept/awesomebar/README.md) implementation to a [concept-toolbar](components/concept/toolbar/README.md) implementation and provides implementations of various suggestion providers.
|
||||
|
||||
* 🔴 [**Containers**](components/feature/containers/README.md) - A component for working with contextual identities also known as containers.
|
||||
|
||||
* 🔵 [**Context Menu**](components/feature/contextmenu/README.md) - A component for displaying context menus when *long-pressing* web content.
|
||||
|
||||
* 🔵 [**Custom Tabs**](components/feature/customtabs/README.md) - A component for providing [Custom Tabs](https://developer.chrome.com/multidevice/android/customtabs) functionality in browsers.
|
||||
|
||||
* 🔵 [**Downloads**](components/feature/downloads/README.md) - A component to perform downloads using the [Android downloads manager](https://developer.android.com/reference/android/app/DownloadManager).
|
||||
|
||||
* 🔵 [**Intent**](components/feature/intent/README.md) - A component that provides intent processing functionality by combining various other feature modules.
|
||||
|
||||
* ⚪ [**Progressive Web Apps (PWA)**](components/feature/pwa/README.md) - A component that provides functionality for supporting Progressive Web Apps (PWA).
|
||||
|
||||
* 🔵 [**Reader View**](components/feature/readerview/README.md) - A component that provides Reader View functionality.
|
||||
|
||||
* 🔵 [**QR**](components/feature/qr/README.md) - A component that provides functionality for scanning QR codes.
|
||||
|
||||
* 🔵 [**Search**](components/feature/search/README.md) - A component that connects an (concept) engine implementation with the browser search module.
|
||||
|
||||
* 🔵 [**Session**](components/feature/session/README.md) - A component that connects an (concept) engine implementation with the browser session and storage modules.
|
||||
|
||||
* 🔵 [**Share**](components/feature/share/README.md) - Feature implementation for saving and sorting recent apps used for sharing.
|
||||
|
||||
* 🔵 [**Sync**](components/feature/sync/README.md) -A component that provides synchronization orchestration for groups of (concept) SyncableStore objects.
|
||||
|
||||
* 🔵 [**Tabs**](components/feature/tabs/README.md) - A component that connects a tabs tray implementation with the session and toolbar modules.
|
||||
|
||||
* 🔵 [**Tab Collections**](components/feature/tab-collections/README.md) - Feature implementation for saving, restoring and organizing collections of tabs.
|
||||
|
||||
* 🔵 [**Toolbar**](components/feature/toolbar/README.md) - A component that connects a (concept) toolbar implementation with the browser session module.
|
||||
|
||||
* 🔵 [**Top Sites**](components/feature/top-sites/README.md) - Feature implementation for saving and removing top sites.
|
||||
|
||||
* 🔵 [**Prompts**](components/feature/prompts/README.md) - A component that will handle all the common prompt dialogs from web content.
|
||||
|
||||
* 🔵 [**Push**](components/feature/push/README.md) - A component that provides Autopush messages with help from a supported push service.
|
||||
|
||||
* 🔵 [**Find In Page**](components/feature/findinpage/README.md) - A component that provides an UI widget for [find in page functionality](https://support.mozilla.org/en-US/kb/search-contents-current-page-text-or-links).
|
||||
|
||||
* 🔵 [**Remote Tabs**](components/feature/remotetabs/README.md) - Feature that provides access to other device's tabs in the same account.
|
||||
|
||||
* 🔵 [**Site Permissions**](components/feature/sitepermissions/README.md) - A feature for showing site permission request prompts.
|
||||
|
||||
* 🔵 [**WebAuthn**](components/feature/webauthn/README.md) - A feature that provides WebAuthn functionality for supported engines.
|
||||
|
||||
* 🔵 [**Web Notifications**](components/feature/webnotifications/README.md) - A component for displaying web notifications.
|
||||
|
||||
* 🔵 [**WebCompat**](components/feature/webcompat/README.md) - A feature to enable website-hotfixing via the Web Compatibility System-Addon.
|
||||
|
||||
* 🔵 [**WebCompat Reporter**](components/feature/webcompat-reporter/README.md) - A feature that enables users to report site issues to Mozilla's Web Compatibility team for further diagnosis.
|
||||
|
||||
* 🔵 [**Web Add-ons**](components/feature/addons/README.md) - A feature that provides functionality for managing add-ons.
|
||||
|
||||
## UI
|
||||
|
||||
_Generic low-level UI components for building apps._
|
||||
|
||||
* 🔵 [**Autocomplete**](components/ui/autocomplete/README.md) - A set of components to provide autocomplete functionality.
|
||||
|
||||
* 🔵 [**Colors**](components/ui/colors/README.md) - The standard set of [Photon](https://design.firefox.com/photon/) colors.
|
||||
|
||||
* 🔵 [**Fonts**](components/ui/fonts/README.md) - The standard set of fonts used by Mozilla Android products.
|
||||
|
||||
* 🔵 [**Icons**](components/ui/icons/README.md) - A collection of often used browser icons.
|
||||
|
||||
* 🔵 [**Tabcounter**](components/ui/tabcounter/README.md) - A button that shows the current tab count and can animate state changes.
|
||||
|
||||
## Service
|
||||
|
||||
_Components and libraries to interact with backend services._
|
||||
|
||||
* 🔵 [**Firefox Accounts (FxA)**](components/service/firefox-accounts/README.md) - A library for integrating with Firefox Accounts.
|
||||
|
||||
* 🔵 [**Firefox Sync - Logins**](components/service/sync-logins/README.md) - A library for integrating with Firefox Sync - Logins.
|
||||
|
||||
* 🔵 [**Firefox Sync - Autofill**](components/service/sync-autofill/README.md) - A library for integrating with Firefox Sync - Autofill.
|
||||
|
||||
* 🔵 [**Glean**](components/service/glean/README.md) - A client-side telemetry SDK for collecting metrics and sending them to Mozilla's telemetry service (eventually replacing [service-telemetry](components/service/telemetry/README.md)).
|
||||
|
||||
* 🔵 [**Location**](components/service/location/README.md) - A library for accessing Mozilla's and other location services.
|
||||
|
||||
* 🔴 [**Nimbus**](components/service/nimbus/README.md) - A wrapper for the Nimbus SDK.
|
||||
|
||||
* 🔵 [**Pocket**](components/service/pocket/README.md) - A library for communicating with the Pocket API.
|
||||
|
||||
* 🔵 [**Contile**](components/service/contile/README.md) - A library for communicating with the Contile services API.
|
||||
|
||||
## Support
|
||||
|
||||
_Supporting components with generic helper code._
|
||||
|
||||
* 🔵 [**Android Test**](components/support/android-test/README.md) - A collection of helpers for testing components in instrumented (on device) tests (`src/androidTest`).
|
||||
|
||||
* 🔵 [**Base**](components/support/base/README.md) - Base component containing building blocks for components.
|
||||
|
||||
* 🔵 [**Ktx**](components/support/ktx/README.md) - A set of Kotlin extensions on top of the Android framework and Kotlin standard library.
|
||||
|
||||
* 🔵 [**Test**](components/support/test/README.md) - A collection of helpers for testing components in local unit tests (`src/test`).
|
||||
|
||||
* 🔵 [**Test Appservices**](components/support/test-appservices/README.md) - A component for synchronizing Application Services' unit testing dependencies used in Android Components.
|
||||
|
||||
* 🔵 [**Test LibState**](components/support/test-libstate/README.md) - A collection of helpers for testing functionality that relies on the lib-state component in local unit tests (`src/test`).
|
||||
|
||||
* 🔵 [**Utils**](components/support/utils/README.md) - Generic utility classes to be shared between projects.
|
||||
|
||||
* 🔵 [**Webextensions**](components/support/webextensions/README.md) - A component containing building blocks for features implemented as web extensions.
|
||||
|
||||
## Standalone libraries
|
||||
|
||||
* 🔵 [**Crash**](components/lib/crash/README.md) - A generic crash reporter component that can report crashes to multiple services.
|
||||
|
||||
* 🔵 [**Dataprotect**](components/lib/dataprotect/README.md) - A component using AndroidKeyStore to protect user data.
|
||||
|
||||
* 🔵 [**Fetch-HttpURLConnection**](components/lib/fetch-httpurlconnection/README.md) - A [concept-fetch](concept/fetch/README.md) implementation using [HttpURLConnection](https://developer.android.com/reference/java/net/HttpURLConnection.html).
|
||||
|
||||
* 🔵 [**Fetch-OkHttp**](components/lib/fetch-okhttp/README.md) - A [concept-fetch](concept/fetch/README.md) implementation using [OkHttp](https://github.com/square/okhttp).
|
||||
|
||||
* ⚪ [**JEXL**](components/lib/jexl/README.md) - Javascript Expression Language: Context-based expression parser and evaluator.
|
||||
|
||||
* 🔵 [**Public Suffix List**](components/lib/publicsuffixlist/README.md) - A library for reading and using the [public suffix list](https://publicsuffix.org/).
|
||||
|
||||
* 🔵 [**Push-Firebase**](components/lib/push-firebase/README.md) - A [concept-push](concept/push/README.md) implementation using [Firebase Cloud Messaging](https://firebase.google.com/products/cloud-messaging/).
|
||||
|
||||
* 🔵 [**State**](components/lib/state/README.md) - A library for maintaining application state.
|
||||
|
||||
## Tooling
|
||||
|
||||
* 🔵 [**Fetch-Tests**](components/tooling/fetch-tests/README.md) - A generic test suite for components that implement [concept-fetch](concept/fetch/README.md).
|
||||
|
||||
* 🔵 [**Lint**](components/tooling/lint/README.md) - Custom Lint rules for the components repository.
|
||||
|
||||
# Sample apps
|
||||
|
||||
_Sample apps using various components._
|
||||
|
||||
* [**Browser**](samples/browser) - A simple browser composed from browser components. This sample application is only a very basic browser. For a full-featured reference browser implementation see the **[reference-browser repository](https://github.com/mozilla-mobile/reference-browser)**.
|
||||
|
||||
* [**Crash**](samples/crash) - An app showing the integration of the `lib-crash` component.
|
||||
|
||||
* [**Firefox Accounts (FxA)**](samples/firefox-accounts) - A simple app demoing Firefox Accounts integration.
|
||||
|
||||
* [**Firefox Sync**](samples/sync) - A simple app demoing general Firefox Sync integration, with bookmarks and history.
|
||||
|
||||
* [**Firefox Sync - Logins**](samples/sync-logins) - A simple app demoing Firefox Sync (Logins) integration.
|
||||
|
||||
* [**DataProtect**](samples/dataprotect) - An app demoing how to use the [**Dataprotect**](components/lib/dataprotect/README.md) component to load and store encrypted data in `SharedPreferences`.
|
||||
|
||||
* [**Glean**](samples/glean) - An app demoing how to use the [**Glean**](components/service/glean/README.md) library to collect and send telemetry data.
|
||||
|
||||
* [**Toolbar**](samples/toolbar) - An app demoing multiple customized toolbars using the [**browser-toolbar**](components/browser/toolbar/README.md) component.
|
||||
|
||||
# Building #
|
||||
|
||||
## Command line ##
|
||||
|
||||
```
|
||||
$ git clone https://github.com/mozilla-mobile/android-components.git
|
||||
$ cd android-components
|
||||
$ ./gradlew assemble
|
||||
```
|
||||
|
||||
## Android Studio ##
|
||||
|
||||
If the environment variable `JAVA_HOME` is not defined, you will need to set it. If you would like to use the JDK installed by Android Studio, here's how to find it:
|
||||
|
||||
1. Open Android Studio.
|
||||
2. Select "Configure".
|
||||
3. Select "Default Project Structure". You should now see the Android JDK location.
|
||||
4. Set the environment variable `JAVA_HOME` to the location. (How you set an environment variable depends on your OS.)
|
||||
5. Restart Android Studio.
|
||||
|
||||
Once the environment variable is set, you can import the project into Android Studio with the default wizard options.
|
||||
|
||||
If your build fails, you may find you get more instructive error messages by attempting the build at the command line.
|
||||
|
||||
# Coding Standards #
|
||||
|
||||
## Style ##
|
||||
We follow the style enforced by [ktlint](https://ktlint.github.io/) and [detekt](https://arturbosch.github.io/detekt/). See [how to configure Android Studio appropriately](https://github.com/pinterest/ktlint#option-1-recommended).
|
||||
|
||||
To check your style, run:
|
||||
|
||||
```
|
||||
./gradlew ktlint
|
||||
./gradlew detekt
|
||||
```
|
||||
|
||||
## Documentation ##
|
||||
We use `README.md` files for each component.
|
||||
|
||||
If you fix a bug or change an API, you should update [docs/changelog.md](https://github.com/mozilla-mobile/android-components/blob/main/docs/changelog.md).
|
||||
|
||||
## Testing ##
|
||||
You are expected to both add tests for code that you write and make sure that your changes do not
|
||||
cause existing tests to fail. You may find these command lines helpful:
|
||||
|
||||
```
|
||||
./gradlew test # Run all tests
|
||||
./gradlew :support-ktx:testdebugunittest # Run unit tests for a specified module
|
||||
```
|
||||
|
||||
See also [how to measure code coverage](https://mozac.org/contributing/code-coverage).
|
||||
|
||||
## Accessibility ##
|
||||
If your code has user-facing changes, follow [Android accessibility best practices](https://github.com/mozilla-mobile/shared-docs/blob/main/android/accessibility_guide.md).
|
||||
|
||||
# License
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
@ -0,0 +1,19 @@
|
|||
android {
|
||||
lint {
|
||||
warningsAsErrors true
|
||||
abortOnError (project.name != "support-test")
|
||||
|
||||
// With our L10N process its totally possible to have missing or (temporarily) extra translations.
|
||||
disable 'MissingTranslation',
|
||||
'ExtraTranslation',
|
||||
// We do not want to enforce this as a generic rule for all languages (see #6117, #6056, #6118)
|
||||
'TypographyEllipsis',
|
||||
// https://github.com/mozilla-mobile/android-components/issues/10641
|
||||
'UnspecifiedImmutableFlag',
|
||||
// https://github.com/mozilla-mobile/android-components/issues/10643
|
||||
'UnusedResources',
|
||||
// "We do not impose rules on locales"
|
||||
// https://github.com/mozilla-mobile/android-components/pull/11069
|
||||
'TypographyDashes'
|
||||
}
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
#!/usr/bin/env python3
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
|
||||
# Purpose: Publish android packages to local maven repo, but only if changed since last publish.
|
||||
# Dependencies: None
|
||||
# Usage: ./automation/publish_to_maven_local_if_modified.py
|
||||
|
||||
import argparse
|
||||
import hashlib
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def fatal_err(msg):
|
||||
print(f"\033[31mError: {msg}\033[0m")
|
||||
exit(1)
|
||||
|
||||
|
||||
def run_cmd_checked(*args, **kwargs):
|
||||
"""Run a command, throwing an exception if it exits with non-zero status."""
|
||||
kwargs["check"] = True
|
||||
return subprocess.run(*args, **kwargs)
|
||||
|
||||
|
||||
def find_project_root():
|
||||
"""Find the absolute path of the project repository root."""
|
||||
# As a convention, we expect this file in [project-root]/automation/.
|
||||
automation_dir = Path(__file__).parent
|
||||
|
||||
# Therefore the automation dir's parent is the project root we're looking for.
|
||||
return automation_dir.parent
|
||||
|
||||
|
||||
LAST_CONTENTS_HASH_FILE = ".lastAutoPublishContentsHash"
|
||||
|
||||
GITIGNORED_FILES_THAT_AFFECT_THE_BUILD = ["local.properties"]
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Publish android packages to local maven repo, but only if changed since last publish"
|
||||
)
|
||||
parser.parse_args()
|
||||
|
||||
root_dir = find_project_root()
|
||||
if str(root_dir) != os.path.abspath(os.curdir):
|
||||
fatal_err(
|
||||
f"This only works if run from the repo root ({root_dir!r} != {os.path.abspath(os.curdir)!r})"
|
||||
)
|
||||
|
||||
# Calculate a hash reflecting the current state of the repo.
|
||||
|
||||
contents_hash = hashlib.sha256()
|
||||
|
||||
contents_hash.update(
|
||||
run_cmd_checked(["git", "rev-parse", "HEAD"], capture_output=True).stdout
|
||||
)
|
||||
contents_hash.update(b"\x00")
|
||||
|
||||
# Get a diff of all tracked (staged and unstaged) files.
|
||||
|
||||
changes = run_cmd_checked(["git", "diff", "HEAD", "."], capture_output=True).stdout
|
||||
contents_hash.update(changes)
|
||||
contents_hash.update(b"\x00")
|
||||
|
||||
# But unfortunately it can only tell us the names of untracked
|
||||
# files, and it won't tell us anything about files that are in
|
||||
# .gitignore but can still affect the build.
|
||||
|
||||
untracked_files = []
|
||||
|
||||
# Get a list of all untracked files sans standard exclusions.
|
||||
|
||||
# -o is for getting other (i.e. untracked) files
|
||||
# --exclude-standard is to handle standard Git exclusions: .git/info/exclude, .gitignore in each directory,
|
||||
# and the user's global exclusion file.
|
||||
changes_others = run_cmd_checked(
|
||||
["git", "ls-files", "-o", "--exclude-standard"], capture_output=True
|
||||
).stdout
|
||||
changes_lines = iter(ln.strip() for ln in changes_others.split(b"\n"))
|
||||
|
||||
try:
|
||||
ln = next(changes_lines)
|
||||
while ln:
|
||||
untracked_files.append(ln)
|
||||
ln = next(changes_lines)
|
||||
except StopIteration:
|
||||
pass
|
||||
|
||||
# Then, account for some excluded files that we care about.
|
||||
untracked_files.extend(GITIGNORED_FILES_THAT_AFFECT_THE_BUILD)
|
||||
|
||||
# Finally, get hashes of everything.
|
||||
# Skip files that don't exist, e.g. missing GITIGNORED_FILES_THAT_AFFECT_THE_BUILD. `hash-object` errors out if it gets
|
||||
# a non-existent file, so we hope that disk won't change between this filter and the cmd run just below.
|
||||
filtered_untracked = [nm for nm in untracked_files if os.path.isfile(nm)]
|
||||
# Reading contents of the files is quite slow when there are lots of them, so delegate to `git hash-object`.
|
||||
git_hash_object_cmd = ["git", "hash-object"]
|
||||
git_hash_object_cmd.extend(filtered_untracked)
|
||||
changes_untracked = run_cmd_checked(git_hash_object_cmd, capture_output=True).stdout
|
||||
contents_hash.update(changes_untracked)
|
||||
contents_hash.update(b"\x00")
|
||||
|
||||
contents_hash = contents_hash.hexdigest()
|
||||
|
||||
# If the contents hash has changed since last publish, re-publish.
|
||||
last_contents_hash = ""
|
||||
try:
|
||||
with open(LAST_CONTENTS_HASH_FILE) as f:
|
||||
last_contents_hash = f.read().strip()
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
if contents_hash == last_contents_hash:
|
||||
print("Contents have not changed, no need to publish")
|
||||
else:
|
||||
print("Contents have changed, publishing")
|
||||
if sys.platform.startswith("win"):
|
||||
run_cmd_checked(
|
||||
["gradlew.bat", "publishToMavenLocal", f"-Plocal={time.time_ns()}"],
|
||||
shell=True,
|
||||
)
|
||||
else:
|
||||
run_cmd_checked(
|
||||
["./gradlew", "publishToMavenLocal", f"-Plocal={time.time_ns()}"]
|
||||
)
|
||||
with open(LAST_CONTENTS_HASH_FILE, "w") as f:
|
||||
f.write(contents_hash)
|
||||
f.write("\n")
|
|
@ -0,0 +1,53 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# If a command fails then do not proceed and fail this script too.
|
||||
set -ex
|
||||
|
||||
# TODO: This script should only run if there's no PR open already.
|
||||
|
||||
# Setup git
|
||||
git config --global user.email "sebastian@mozilla.com"
|
||||
git config --global user.name "MickeyMoz"
|
||||
|
||||
# Generate docs and copy to destination
|
||||
./gradlew clean docs
|
||||
rm -rf docs/api
|
||||
mkdir docs/api
|
||||
cp -R build/javadoc/android-components/* docs/api/
|
||||
|
||||
# Timestamp used in branch name and commit
|
||||
TIMESTAMP=`date "+%Y%m%d-%H%M%S"`
|
||||
BRANCH="DOCS-$TIMESTAMP"
|
||||
|
||||
# Create a branch and commit local changes
|
||||
git checkout -b $BRANCH
|
||||
git add docs/api
|
||||
git commit -m \
|
||||
"Update docs ($TIMESTAMP)" \
|
||||
--author="MickeyMoz <sebastian@mozilla.com>" \
|
||||
|| { echo "No changes to commit"; exit 0; }
|
||||
|
||||
# Get token for using GitHub
|
||||
python automation/taskcluster/helper/get-secret.py \
|
||||
-s project/mobile/github \
|
||||
-k botAccountToken \
|
||||
-f .github_token \
|
||||
|
||||
# From here on we do not want to print the commands since they contain tokens
|
||||
set +x
|
||||
|
||||
USER='MickeyMoz'
|
||||
REPO='android-components'
|
||||
TOKEN=`cat .github_token`
|
||||
URL="https://$USER:$TOKEN@github.com/$USER/$REPO/"
|
||||
|
||||
echo "token=$TOKEN" > token.properties
|
||||
|
||||
echo "Pushing branch to GitHub"
|
||||
git push --no-verify --quiet $URL $BRANCH
|
||||
echo "Done ($?)"
|
||||
|
||||
echo "Opening pull request"
|
||||
./gradlew openPR -Ptitle="Docs update ($TIMESTAMP) [ci skip]" -Pbranch="$BRANCH" -PtokenFile="token.properties"
|
|
@ -0,0 +1,89 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# If a command fails then do not proceed and fail this script too.
|
||||
set -ex
|
||||
|
||||
# TODO: This script should only run if there's no PR open already.
|
||||
|
||||
CHANNEL=$1
|
||||
|
||||
# Setup git
|
||||
git config --global user.email "sebastian@mozilla.com"
|
||||
git config --global user.name "MickeyMoz"
|
||||
|
||||
# Use Gradle plugin to look for new GeckoView version (non major version update!)
|
||||
if [ "$CHANNEL" = "nightly" ]
|
||||
then
|
||||
./gradlew updateGVNightlyVersion
|
||||
elif [ "$CHANNEL" = "beta" ]
|
||||
then
|
||||
./gradlew updateGVBetaVersion
|
||||
elif [ "$CHANNEL" = "release" ]
|
||||
then
|
||||
./gradlew updateGVStableVersion
|
||||
else
|
||||
echo "Unknown channel: $CHANNEL"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Timestamp used in branch name and commit
|
||||
TIMESTAMP=`date "+%Y%m%d-%H%M%S"`
|
||||
BRANCH="GV-$CHANNEL-$TIMESTAMP"
|
||||
|
||||
# Create a branch and commit local changes
|
||||
git checkout -b $BRANCH
|
||||
git add buildSrc/src/main/java/Gecko.kt
|
||||
git commit -m \
|
||||
"Update GeckoView ($CHANNEL) ($TIMESTAMP)" \
|
||||
--author="MickeyMoz <sebastian@mozilla.com>" \
|
||||
|| { echo "No new GeckoView version ($CHANNEL) available"; exit 0; }
|
||||
|
||||
# This will be 'engine-gecko-$CHANNEL' for non-release channels.
|
||||
# Intentionally left empty.
|
||||
COMPONENT_NAME=
|
||||
|
||||
# Build and test engine component as well as sample browser
|
||||
if [ "$CHANNEL" = "nightly" ]
|
||||
then
|
||||
COMPONENT_NAME="engine-gecko-nightly"
|
||||
elif [ "$CHANNEL" = "beta" ]
|
||||
then
|
||||
COMPONENT_NAME="engine-gecko-beta"
|
||||
elif [ "$CHANNEL" = "release" ]
|
||||
then
|
||||
COMPONENT_NAME="engine-gecko"
|
||||
else
|
||||
echo "Unknown channel: $CHANNEL"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# The build system automatically updates the docs. Add them to the
|
||||
# docs PR, if they exist.
|
||||
if git add components/browser/${COMPONENT_NAME}/docs/metrics.md ; then
|
||||
git commit --no-edit --amend
|
||||
fi
|
||||
|
||||
# Get token for using GitHub
|
||||
python automation/taskcluster/helper/get-secret.py \
|
||||
-s project/mobile/github \
|
||||
-k botAccountToken \
|
||||
-f .github_token \
|
||||
|
||||
# From here on we do not want to print the commands since they contain tokens
|
||||
set +x
|
||||
|
||||
USER='MickeyMoz'
|
||||
REPO='android-components'
|
||||
TOKEN=`cat .github_token`
|
||||
URL="https://$USER:$TOKEN@github.com/$USER/$REPO/"
|
||||
|
||||
echo "token=$TOKEN" > token.properties
|
||||
|
||||
echo "Pushing branch to GitHub"
|
||||
git push --no-verify --quiet $URL $BRANCH > /dev/null 2>&1 || echo "Failed ($?)"
|
||||
echo "Done ($?)"
|
||||
|
||||
echo "Opening pull request"
|
||||
./gradlew openPR -Ptitle="GeckoView update ($CHANNEL) ($TIMESTAMP)" -Pbranch="$BRANCH" -PtokenFile="token.properties"
|
|
@ -0,0 +1,50 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# If a command fails then do not proceed and fail this script too.
|
||||
set -ex
|
||||
|
||||
# TODO: This script should only run if there's no PR open already.
|
||||
|
||||
# Setup git
|
||||
git config --global user.email "sebastian@mozilla.com"
|
||||
git config --global user.name "MickeyMoz"
|
||||
|
||||
# Use Gradle plugin to look for new GeckoView version (non major version update!)
|
||||
./gradlew updatePSL
|
||||
|
||||
# Timestamp used in branch name and commit
|
||||
TIMESTAMP=`date "+%Y%m%d-%H%M%S"`
|
||||
BRANCH="PSL-$TIMESTAMP"
|
||||
|
||||
# Create a branch and commit local changes
|
||||
git checkout -b $BRANCH
|
||||
git add components/lib/publicsuffixlist/src/main/assets/publicsuffixes
|
||||
git commit -m \
|
||||
"Update Public Suffix List ($TIMESTAMP)" \
|
||||
--author="MickeyMoz <sebastian@mozilla.com>" \
|
||||
|| { echo "No new public suffix list available available"; exit 0; }
|
||||
|
||||
# Get token for using GitHub
|
||||
python automation/taskcluster/helper/get-secret.py \
|
||||
-s project/mobile/github \
|
||||
-k botAccountToken \
|
||||
-f .github_token \
|
||||
|
||||
# From here on we do not want to print the commands since they contain tokens
|
||||
set +x
|
||||
|
||||
USER='MickeyMoz'
|
||||
REPO='android-components'
|
||||
TOKEN=`cat .github_token`
|
||||
URL="https://$USER:$TOKEN@github.com/$USER/$REPO/"
|
||||
|
||||
echo "token=$TOKEN" > token.properties
|
||||
|
||||
echo "Pushing branch to GitHub"
|
||||
git push --no-verify --quiet $URL $BRANCH > /dev/null 2>&1 || echo "Failed ($?)"
|
||||
echo "Done ($?)"
|
||||
|
||||
echo "Opening pull request"
|
||||
./gradlew openPR -Ptitle="Public Suffix List update ($TIMESTAMP)" -Pbranch="$BRANCH" -PtokenFile="token.properties"
|
|
@ -0,0 +1,31 @@
|
|||
# Google Cloud Documentation: https://cloud.google.com/sdk/gcloud/reference/firebase/test/android/run
|
||||
# Flank Documentation: https://flank.github.io/flank/
|
||||
gcloud:
|
||||
results-bucket: android-components_test_artifacts
|
||||
record-video: true
|
||||
timeout: 30m
|
||||
async: false
|
||||
num-flaky-test-attempts: 2
|
||||
|
||||
app: /APP/PATH
|
||||
test: /TEST/PATH
|
||||
|
||||
auto-google-login: false
|
||||
use-orchestrator: true
|
||||
environment-variables:
|
||||
clearPackageData: true
|
||||
directories-to-pull:
|
||||
- /sdcard/screenshots
|
||||
performance-metrics: true
|
||||
|
||||
device:
|
||||
- model: Pixel2.arm
|
||||
version: 28
|
||||
locale: en_US
|
||||
|
||||
flank:
|
||||
project: GOOGLE_PROJECT
|
||||
max-test-shards: -1
|
||||
num-test-runs: 1
|
||||
output-style: compact
|
||||
full-junit-result: true
|
|
@ -0,0 +1,31 @@
|
|||
# Google Cloud Documentation: https://cloud.google.com/sdk/gcloud/reference/firebase/test/android/run
|
||||
# Flank Documentation: https://flank.github.io/flank/
|
||||
gcloud:
|
||||
results-bucket: android-components_test_artifacts
|
||||
record-video: true
|
||||
timeout: 30m
|
||||
async: false
|
||||
num-flaky-test-attempts: 1
|
||||
|
||||
app: /app/path
|
||||
test: /test/path
|
||||
|
||||
auto-google-login: false
|
||||
use-orchestrator: true
|
||||
environment-variables:
|
||||
clearPackageData: true
|
||||
directories-to-pull:
|
||||
- /sdcard/screenshots
|
||||
performance-metrics: true
|
||||
|
||||
device:
|
||||
- model: Pixel2
|
||||
version: 28
|
||||
|
||||
flank:
|
||||
project: GOOGLE_PROJECT
|
||||
max-test-shards: -1
|
||||
num-test-runs: 1
|
||||
output-style: compact
|
||||
full-junit-result: true
|
||||
repeat-tests: 1
|
|
@ -0,0 +1,76 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import yaml
|
||||
|
||||
|
||||
def parse_args(cmdln_args):
|
||||
parser = argparse.ArgumentParser(description="Parse UI test logs an results")
|
||||
parser.add_argument(
|
||||
"--output-md",
|
||||
type=argparse.FileType("w", encoding="utf-8"),
|
||||
help="Output markdown file.",
|
||||
required=True,
|
||||
)
|
||||
parser.add_argument(
|
||||
"--log",
|
||||
type=argparse.FileType("r", encoding="utf-8"),
|
||||
help="Log output of flank.",
|
||||
required=True,
|
||||
)
|
||||
parser.add_argument(
|
||||
"--results", type=Path, help="Directory containing flank results", required=True
|
||||
)
|
||||
parser.add_argument(
|
||||
"--exit-code", type=int, help="Exit code of flank.", required=True
|
||||
)
|
||||
parser.add_argument("--device-type", help="Type of device ", required=True)
|
||||
return parser.parse_args(args=cmdln_args)
|
||||
|
||||
|
||||
def extract_android_args(log):
|
||||
return yaml.safe_load(log.split("AndroidArgs\n")[1].split("RunTests\n")[0])
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args(sys.argv[1:])
|
||||
|
||||
log = args.log.read()
|
||||
matrix_ids = json.loads(args.results.joinpath("matrix_ids.json").read_text())
|
||||
# with args.results.joinpath("flank.yml") as f:
|
||||
# flank_config = yaml.safe_load(f)
|
||||
|
||||
android_args = extract_android_args(log)
|
||||
|
||||
print = args.output_md.write
|
||||
|
||||
print("# Devices\n")
|
||||
print(yaml.safe_dump(android_args["gcloud"]["device"]))
|
||||
|
||||
print("# Results\n")
|
||||
print("| matrix | result | logs | details \n")
|
||||
print("| --- | --- | --- | --- |\n")
|
||||
for matrix, matrix_result in matrix_ids.items():
|
||||
print(
|
||||
"| {matrixId} | {outcome} | [logs]({webLink}) | {axes[0][details]}\n".format(
|
||||
**matrix_result
|
||||
)
|
||||
)
|
||||
print("---\n")
|
||||
print("# References & Documentation\n")
|
||||
print(
|
||||
"* [Automated UI Testing Documentation](https://github.com/mozilla-mobile/shared-docs/blob/main/android/ui-testing.md)\n"
|
||||
)
|
||||
print(
|
||||
"* Mobile Test Engineering on [Confluence](https://mozilla-hub.atlassian.net/wiki/spaces/MTE/overview) | [Slack](https://mozilla.slack.com/archives/C02KDDS9QM9) | [Alerts](https://mozilla.slack.com/archives/C0134KJ4JHL)\n"
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,151 @@
|
|||
#!/usr/bin/env bash
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# This script does the following:
|
||||
# 1. Retrieves glcoud service account token
|
||||
# 2. Activates gcloud service account
|
||||
# 3. Connects to google Firebase (using TestArmada's Flank tool)
|
||||
# 4. Executes UI tests
|
||||
# 5. Puts test artifacts into the test_artifacts folder
|
||||
|
||||
# NOTE:
|
||||
# Flank supports sharding across multiple devices at a time, but gcloud API
|
||||
# only supports 1 defined APK per test run.
|
||||
|
||||
|
||||
# If a command fails then do not proceed and fail this script too.
|
||||
set -e
|
||||
|
||||
#########################
|
||||
# The command line help #
|
||||
#########################
|
||||
display_help() {
|
||||
echo "Usage: $0 Component_Name Build_Variant [Number_Shards...]"
|
||||
echo
|
||||
echo "Examples:"
|
||||
echo "To run component/browser tests on ARM device shard (1 test / shard)"
|
||||
echo "$ execute-firebase-test.sh component arm"
|
||||
echo
|
||||
echo "To run component/feature tests on X86 device (on 3 shards)"
|
||||
echo "$ execute-firebase-test.sh feature x86 3"
|
||||
echo
|
||||
echo "To run UI samples/sampleName tests"
|
||||
echo "$ execute-firebase-test.sh sample-sampleName arm 1"
|
||||
echo
|
||||
}
|
||||
|
||||
# Basic parameter check
|
||||
if [[ $# -lt 2 ]]; then
|
||||
echo "Your command line contains $# arguments"
|
||||
display_help
|
||||
exit 1
|
||||
fi
|
||||
|
||||
component="$1" # browser, concept, feature
|
||||
device_type="$2" # arm | x86
|
||||
if [[ ! -z "$3" ]]; then
|
||||
num_shards=$3
|
||||
fi
|
||||
|
||||
JAVA_BIN="/usr/bin/java"
|
||||
PATH_TEST="./automation/taskcluster/androidTest"
|
||||
FLANK_BIN="/builds/worker/test-tools/flank.jar"
|
||||
FLANK_CONF_ARM="${PATH_TEST}/flank-arm.yml"
|
||||
FLANK_CONF_X86="${PATH_TEST}/flank-x86.yml"
|
||||
ARTIFACT_DIR="/builds/worker/artifacts"
|
||||
RESULTS_DIR="${ARTIFACT_DIR}/results"
|
||||
|
||||
echo
|
||||
echo "ACTIVATE SERVICE ACCT"
|
||||
echo
|
||||
# this is where the Google Testcloud project ID is set
|
||||
gcloud config set project "$GOOGLE_PROJECT"
|
||||
echo
|
||||
|
||||
gcloud auth activate-service-account --key-file "$GOOGLE_APPLICATION_CREDENTIALS"
|
||||
echo
|
||||
echo
|
||||
|
||||
# From now on disable exiting on error. If the tests fail we want to continue
|
||||
# and try to download the artifacts. We will exit with the actual error code later.
|
||||
set +e
|
||||
|
||||
if [[ "${device_type,,}" == "x86" ]]
|
||||
then
|
||||
flank_template="$FLANK_CONF_X86"
|
||||
else
|
||||
flank_template="$FLANK_CONF_ARM"
|
||||
fi
|
||||
|
||||
# Remove samples- from the component for each APK path
|
||||
samples=${component//samples-}
|
||||
|
||||
# If tests are for components, the path is different than for samples
|
||||
if [[ "${component}" != samples-* ]]
|
||||
then
|
||||
# Case 1: tests for any component (but NOT samples, NOT real UI tests)
|
||||
APK_APP="./samples/browser/build/outputs/apk/gecko/debug/samples-browser-gecko-debug.apk"
|
||||
if [[ "${component}" == *"-"* ]]
|
||||
then
|
||||
regex='([a-z]*)-(.*)'
|
||||
[[ "$component" =~ $regex ]]
|
||||
APK_TEST="./components/${BASH_REMATCH[1]}/${BASH_REMATCH[2]}/build/outputs/apk/androidTest/debug/${component}-debug-androidTest.apk"
|
||||
else
|
||||
APK_TEST="./components/${component}/engine-gecko/build/outputs/apk/androidTest/debug/browser-engine-gecko-debug-androidTest.apk"
|
||||
fi
|
||||
elif [[ "${component}" == "samples-browser" ]]
|
||||
then
|
||||
# Case 2: tests for browser sample (gecko sample only)
|
||||
APK_APP="./samples/${samples}/build/outputs/apk/gecko/debug/samples-${samples}-gecko-debug.apk"
|
||||
APK_TEST="./samples/${samples}/build/outputs/apk/androidTest/gecko/debug/samples-{$samples}-gecko-debug-androidTest.apk"
|
||||
else
|
||||
# Case 3: tests for non-browser samples (i.e. samples-glean)
|
||||
APK_APP="./samples/${samples}/build/outputs/apk/debug/samples-${samples}-debug.apk"
|
||||
APK_TEST="./samples/${samples}/build/outputs/apk/androidTest/debug/samples-${samples}-debug-androidTest.apk"
|
||||
fi
|
||||
|
||||
# function to exit script with exit code from test run.
|
||||
# (Only 0 if all test executions passed)
|
||||
function failure_check() {
|
||||
echo
|
||||
echo
|
||||
if [[ $exitcode -ne 0 ]]; then
|
||||
echo "ERROR: UI test run failed, please check above URL"
|
||||
else
|
||||
echo "All UI test(s) have passed!"
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "RESULTS"
|
||||
echo
|
||||
mkdir -p ${ARTIFACT_DIR}/github
|
||||
chmod +x ${PATH_TEST}/parse-ui-test.py
|
||||
${PATH_TEST}/parse-ui-test.py \
|
||||
--exit-code "${exitcode}" \
|
||||
--log flank.log \
|
||||
--results "${RESULTS_DIR}" \
|
||||
--output-md "${ARTIFACT_DIR}/github/customCheckRunText.md" \
|
||||
--device-type "${device_type}"
|
||||
echo
|
||||
echo
|
||||
}
|
||||
|
||||
echo
|
||||
echo "EXECUTE TEST(S)"
|
||||
echo
|
||||
|
||||
set -o pipefail && $JAVA_BIN -jar $FLANK_BIN android run \
|
||||
--config=$flank_template \
|
||||
--max-test-shards=$num_shards \
|
||||
--app=$APK_APP --test=$APK_TEST \
|
||||
--local-result-dir="${RESULTS_DIR}" \
|
||||
--project=$GOOGLE_PROJECT \
|
||||
--client-details=commit=${MOBILE_HEAD_REV:-None},pullRequest=${PULL_REQUEST_NUMBER:-None} \
|
||||
| tee flank.log
|
||||
|
||||
exitcode=$?
|
||||
failure_check
|
||||
|
||||
exit $exitcode
|
|
@ -0,0 +1,393 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
import io.gitlab.arturbosch.detekt.Detekt
|
||||
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask
|
||||
import org.gradle.internal.logging.text.StyledTextOutput.Style
|
||||
import org.gradle.internal.logging.text.StyledTextOutputFactory
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import static org.gradle.api.tasks.testing.TestResult.ResultType
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
if (project.hasProperty("googleRepo")) {
|
||||
maven {
|
||||
name "Google"
|
||||
url project.property("googleRepo")
|
||||
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
||||
}
|
||||
} else {
|
||||
google()
|
||||
}
|
||||
|
||||
if (project.hasProperty("centralRepo")) {
|
||||
maven {
|
||||
name "MavenCentral"
|
||||
url project.property("centralRepo")
|
||||
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
||||
}
|
||||
} else {
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath ComponentsDependencies.tools_androidgradle
|
||||
classpath ComponentsDependencies.tools_kotlingradle
|
||||
}
|
||||
|
||||
// Variables in plugins {} aren't directly supported. Hack around it by setting an
|
||||
// intermediate variable which can pull from FenixDependencies.kt and be used later.
|
||||
ext {
|
||||
detekt_plugin = Versions.detekt
|
||||
python_envs_plugin = Versions.python_envs_plugin
|
||||
ksp_plugin = Versions.ksp_plugin
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("io.gitlab.arturbosch.detekt").version("$detekt_plugin")
|
||||
id("com.google.devtools.ksp").version("$ksp_plugin")
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
if (project.hasProperty("googleRepo")) {
|
||||
maven {
|
||||
name "Google"
|
||||
url project.property("googleRepo")
|
||||
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
||||
}
|
||||
} else {
|
||||
google()
|
||||
}
|
||||
|
||||
if (project.hasProperty("centralRepo")) {
|
||||
maven {
|
||||
name "MavenCentral"
|
||||
url project.property("centralRepo")
|
||||
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
||||
}
|
||||
} else {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
maven {
|
||||
name "Mozilla"
|
||||
url "https://maven.mozilla.org/maven2"
|
||||
}
|
||||
|
||||
if (ExtraRepositories.mozillaStaging) {
|
||||
maven {
|
||||
name "Mozilla Staging"
|
||||
url "https://maven-default.stage.mozaws.net/maven2"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply plugin: 'jacoco'
|
||||
|
||||
// Enable Kotlin warnings as errors for all modules
|
||||
tasks.withType(KotlinCompile).configureEach {
|
||||
kotlinOptions.allWarningsAsErrors = true
|
||||
}
|
||||
|
||||
project.configurations.configureEach {
|
||||
// Dependencies can't depend on a different major version of Glean than A-C itself.
|
||||
resolutionStrategy.eachDependency { details ->
|
||||
if (details.requested.group == 'org.mozilla.telemetry'
|
||||
&& details.requested.name.contains('glean') ) {
|
||||
def requested = details.requested.version.tokenize(".")
|
||||
def defined = Versions.mozilla_glean.tokenize(".")
|
||||
// Check the major version
|
||||
if (requested[0] != defined[0]) {
|
||||
throw new AssertionError("Cannot resolve to a single Glean version. Requested: ${details.requested.version}, A-C uses: ${Versions.mozilla_glean}")
|
||||
} else {
|
||||
// Enforce that all (transitive) dependencies are using the defined Glean version
|
||||
details.useVersion Versions.mozilla_glean
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resolutionStrategy.capabilitiesResolution.withCapability("org.mozilla.telemetry:glean-native") {
|
||||
def toBeSelected = candidates.find { it.id instanceof ModuleComponentIdentifier && it.id.module.contains('geckoview') }
|
||||
if (toBeSelected != null) {
|
||||
select(toBeSelected)
|
||||
}
|
||||
because 'use GeckoView Glean instead of standalone Glean'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Allow local appservices substitution in each subproject.
|
||||
def appServicesSrcDir = null
|
||||
if (gradle.hasProperty('localProperties.autoPublish.application-services.dir')) {
|
||||
appServicesSrcDir = gradle.getProperty('localProperties.autoPublish.application-services.dir')
|
||||
} else if (gradle.hasProperty('localProperties.branchBuild.application-services.dir')) {
|
||||
appServicesSrcDir = gradle.getProperty('localProperties.branchBuild.application-services.dir')
|
||||
}
|
||||
if (appServicesSrcDir) {
|
||||
if (appServicesSrcDir.startsWith("/")) {
|
||||
apply from: "${appServicesSrcDir}/build-scripts/substitute-local-appservices.gradle"
|
||||
} else {
|
||||
apply from: "${rootProject.projectDir}/${appServicesSrcDir}/build-scripts/substitute-local-appservices.gradle"
|
||||
}
|
||||
}
|
||||
|
||||
// Allow local Glean substitution in each subproject.
|
||||
if (gradle.hasProperty('localProperties.autoPublish.glean.dir')) {
|
||||
ext.gleanSrcDir = gradle."localProperties.autoPublish.glean.dir"
|
||||
apply from: "${rootProject.projectDir}/${gleanSrcDir}/build-scripts/substitute-local-glean.gradle"
|
||||
}
|
||||
|
||||
if (gradle.hasProperty('localProperties.dependencySubstitutions.geckoviewTopsrcdir')) {
|
||||
if (gradle.hasProperty('localProperties.dependencySubstitutions.geckoviewTopobjdir')) {
|
||||
ext.topobjdir = gradle."localProperties.dependencySubstitutions.geckoviewTopobjdir"
|
||||
}
|
||||
ext.topsrcdir = gradle."localProperties.dependencySubstitutions.geckoviewTopsrcdir"
|
||||
apply from: "${topsrcdir}/substitute-local-geckoview.gradle"
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
if (it.hasProperty('android')) {
|
||||
jacoco {
|
||||
toolVersion = Versions.jacoco
|
||||
}
|
||||
|
||||
// Format test output
|
||||
tasks.matching {it instanceof Test}.configureEach() {
|
||||
systemProperty "robolectric.logging", "stdout"
|
||||
systemProperty "logging.test-mode", "true"
|
||||
systemProperty "javax.net.ssl.trustStoreType", "JKS"
|
||||
|
||||
testLogging.events = []
|
||||
|
||||
def out = services.get(StyledTextOutputFactory).create("an-ouput")
|
||||
|
||||
beforeSuite { descriptor ->
|
||||
if (descriptor.getClassName() != null) {
|
||||
out.style(Style.Header).println("\nSUITE: " + descriptor.getClassName())
|
||||
}
|
||||
}
|
||||
|
||||
beforeTest { descriptor ->
|
||||
out.style(Style.Description).println(" TEST: " + descriptor.getName())
|
||||
}
|
||||
|
||||
onOutput { descriptor, event ->
|
||||
logger.lifecycle(" " + event.message.trim())
|
||||
}
|
||||
|
||||
afterTest { descriptor, result ->
|
||||
switch (result.getResultType()) {
|
||||
case ResultType.SUCCESS:
|
||||
out.style(Style.Success).println(" SUCCESS")
|
||||
break
|
||||
|
||||
case ResultType.FAILURE:
|
||||
out.style(Style.Failure).println(" FAILURE")
|
||||
logger.lifecycle("", result.getException())
|
||||
break
|
||||
|
||||
case ResultType.SKIPPED:
|
||||
out.style(Style.Info).println(" SKIPPED")
|
||||
break
|
||||
}
|
||||
logger.lifecycle("")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
lintChecks project(':tooling-lint')
|
||||
}
|
||||
|
||||
android {
|
||||
testOptions {
|
||||
unitTests {
|
||||
includeAndroidResources = true
|
||||
}
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
resources {
|
||||
excludes += ['META-INF/atomicfu.kotlin_module', 'META-INF/AL2.0', 'META-INF/LGPL2.1']
|
||||
// Required dependencies using byte-buddy; remove after this is
|
||||
// fixed by: https://issuetracker.google.com/issues/170131605
|
||||
excludes.add("META-INF/licenses/ASM")
|
||||
|
||||
pickFirsts += ['win32-x86-64/attach_hotspot_windows.dll', 'win32-x86/attach_hotspot_windows.dll']
|
||||
}
|
||||
}
|
||||
|
||||
androidResources {
|
||||
ignoreAssetsPattern "manifest.template.json"
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
tasks.withType(KotlinCompile).configureEach {
|
||||
kotlinOptions.jvmTarget = "17"
|
||||
kotlinOptions.freeCompilerArgs += ["-opt-in=kotlin.RequiresOptIn"]
|
||||
}
|
||||
}
|
||||
|
||||
if (project.hasProperty("coverage") && project.name != "support-test") {
|
||||
android.buildTypes.all { buildType ->
|
||||
tasks.withType(Test).configureEach() {
|
||||
jacoco {
|
||||
includeNoLocationClasses = true
|
||||
excludes = ['jdk.internal.*']
|
||||
}
|
||||
|
||||
finalizedBy { "jacoco${buildType.name.capitalize()}TestReport" }
|
||||
}
|
||||
|
||||
tasks.register("jacoco${buildType.name.capitalize()}TestReport", JacocoReport) {
|
||||
reports {
|
||||
xml.required = true
|
||||
html.required = true
|
||||
}
|
||||
|
||||
def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*',
|
||||
'**/*Test*.*', 'android/**/*.*', '**/*$[0-9].*']
|
||||
def kotlinDebugTree = fileTree(dir: "$project.buildDir/tmp/kotlin-classes/${buildType.name}", excludes: fileFilter)
|
||||
def javaDebugTree = fileTree(dir: "$project.buildDir/intermediates/classes/${buildType.name}", excludes: fileFilter)
|
||||
def mainSrc = "$project.projectDir/src/main/java"
|
||||
|
||||
sourceDirectories.setFrom(files([mainSrc]))
|
||||
classDirectories.setFrom(files([kotlinDebugTree, javaDebugTree]))
|
||||
getExecutionData().setFrom(fileTree(project.buildDir).include([
|
||||
"jacoco/test${buildType.name.capitalize()}UnitTest.exec"
|
||||
]))
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
buildTypes {
|
||||
debug {
|
||||
testCoverageEnabled true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("clean", Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
detekt {
|
||||
input = files("$projectDir/components", "$projectDir/buildSrc", "$projectDir/samples")
|
||||
config = files("$projectDir/config/detekt.yml")
|
||||
baseline = file("$projectDir/config/detekt-baseline.xml")
|
||||
|
||||
reports {
|
||||
html {
|
||||
enabled = true
|
||||
destination = file("$projectDir/build/reports/detekt.html")
|
||||
}
|
||||
xml {
|
||||
enabled = false
|
||||
}
|
||||
txt {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(Detekt).configureEach() {
|
||||
// Custom detekt rules should be build before
|
||||
// See https://arturbosch.github.io/detekt/extensions.html#pitfalls
|
||||
dependsOn(":tooling-detekt:assemble")
|
||||
|
||||
autoCorrect = true
|
||||
|
||||
exclude "**/build.gradle.kts"
|
||||
exclude "**/src/androidTest/**"
|
||||
exclude "**/src/iosTest/**"
|
||||
exclude "**/src/test/**"
|
||||
exclude "**/test/src/**"
|
||||
exclude "**/build/**"
|
||||
exclude "**/resources/**"
|
||||
exclude "**/tmp/**"
|
||||
exclude "**/tooling/fetch/tests/**"
|
||||
exclude "**/tooling/fetch-tests/**"
|
||||
}
|
||||
|
||||
// Apply same path exclusions as for the main task
|
||||
tasks.withType(DetektCreateBaselineTask).configureEach() {
|
||||
exclude "**/src/androidTest/**"
|
||||
exclude "**/src/test/**"
|
||||
exclude "**/test/src/**"
|
||||
exclude "**/build/**"
|
||||
exclude "**/resources/**"
|
||||
exclude "**/tmp/**"
|
||||
exclude "**/tooling/fetch/tests/**"
|
||||
exclude "**/tooling/fetch-tests/**"
|
||||
}
|
||||
|
||||
configurations {
|
||||
ktlint
|
||||
}
|
||||
|
||||
dependencies {
|
||||
ktlint("com.pinterest:ktlint:${Versions.ktlint}") {
|
||||
attributes {
|
||||
attribute(Bundling.BUNDLING_ATTRIBUTE, getObjects().named(Bundling, Bundling.EXTERNAL))
|
||||
}
|
||||
}
|
||||
detektPlugins project(":tooling-detekt")
|
||||
}
|
||||
|
||||
tasks.register("ktlint", JavaExec) {
|
||||
group = "verification"
|
||||
description = "Check Kotlin code style."
|
||||
classpath = configurations.ktlint
|
||||
mainClass.set("com.pinterest.ktlint.Main")
|
||||
args "components/**/*.kt" , "samples/**/*.kt", "!**/build/**/*.kt", "buildSrc/**/*.kt", "--baseline=ktlint-baseline.xml"
|
||||
}
|
||||
|
||||
tasks.register("ktlintFormat", JavaExec) {
|
||||
group = "formatting"
|
||||
description = "Fix Kotlin code style deviations."
|
||||
classpath = configurations.ktlint
|
||||
mainClass.set("com.pinterest.ktlint.Main")
|
||||
args "-F", "components/**/*.kt" , "samples/**/*.kt", "!**/build/**/*.kt", "buildSrc/**/*.kt", "--baseline=ktlint-baseline.xml"
|
||||
jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED")
|
||||
}
|
||||
|
||||
tasks.register("listRepositories") {
|
||||
doLast {
|
||||
println "Repositories:"
|
||||
project.repositories.each { println "Name: " + it.name + "; url: " + it.url }
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("githubBuildDetails", GithubDetailsTask) {
|
||||
text = """### Test result files
|
||||
|
||||
- [Test Coverage]({reportsUrl}/jacoco/jacocoReleaseTestReport/html/index.html)
|
||||
- [Unit Tests]({reportsUrl}/tests/testReleaseUnitTest/index.html)
|
||||
- [Android Lint]({reportsUrl}/lint-results-release.html)"""
|
||||
}
|
||||
|
||||
tasks.register("githubLintDetektDetails", GithubDetailsTask) {
|
||||
text = "### [Detekt Results Android-Components]({reportsUrl}/detekt.html)"
|
||||
}
|
||||
|
||||
tasks.register("githubLintAndroidDetails", GithubDetailsTask) {
|
||||
text = "### [Android Lint Results Android-Components]({reportsUrl}/lint-results-debug.html)"
|
||||
}
|
||||
|
||||
tasks.register("testToolsDir", Exec) {
|
||||
group = "verification"
|
||||
description = "Run tests in the tools/ directory."
|
||||
workingDir = "tools"
|
||||
commandLine = ["python3", "test_list_compatible_dependency_versions.py"]
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
# [Android Components](../../../README.md) > Browser > Domains
|
||||
|
||||
This component provides APIs for managing localized and customizable domain lists (see [Domains](#domains) and [CustomDomains](#customdomains)). It also contains auto-complete functionality for these lists (see [DomainAutoCompleteProvider](#domainautocompleteprovider)) which can be used in conjuction with our [UI autocomplete component](../../ui/autocomplete/README.md).
|
||||
|
||||
## Usage
|
||||
|
||||
### Setting up the dependency
|
||||
|
||||
Use Gradle to download the library from [maven.mozilla.org](https://maven.mozilla.org/) ([Setup repository](../../../README.md#maven-repository)):
|
||||
|
||||
```Groovy
|
||||
implementation "org.mozilla.components:browser-domains:{latest-version}"
|
||||
```
|
||||
|
||||
### Domains
|
||||
|
||||
The `Domains` object is used to load the built-in localized domain lists which are shipped as part of this component. These lists are grouped by country and can be found [in our repository](src/main/assets/domains).
|
||||
|
||||
```Kotlin
|
||||
// Load the domain lists for all countries in the default locale (fallback is US)
|
||||
val domains = Domains.load(context)
|
||||
```
|
||||
|
||||
### CustomDomains
|
||||
|
||||
The `CustomDomains` object can be used to manage a custom domain list which will be stored in `SharedPreferences`.
|
||||
|
||||
```Kotlin
|
||||
// Load the custom domain list
|
||||
val domains = CustomDomains.load(context)
|
||||
|
||||
// Save custom domains
|
||||
CustomDomains.save(context, listOf("mozilla.org", "getpocket.com"))
|
||||
|
||||
// Remove custom domains
|
||||
CustomDomains.remove(context, listOf("nolongerexists.org"))
|
||||
```
|
||||
|
||||
### DomainAutoCompleteProvider
|
||||
|
||||
The class provides auto-complete functionality for both `Domains` and `CustomDomains`.
|
||||
|
||||
```Kotlin
|
||||
// Initialize the provider
|
||||
val provider = DomainAutocompleteProvider()
|
||||
provider.initialize(
|
||||
context,
|
||||
useShippedDomains = true,
|
||||
useCustomDomains = true,
|
||||
loadDomainsFromDisk = true
|
||||
)
|
||||
```
|
||||
|
||||
Note that when `loadDomainsFromDisk` is set to true there is no need to manually call `load` on either `Domains` or `CustomDomains`.
|
||||
|
||||
```Kotlin
|
||||
// Autocomplete domain lists
|
||||
val result = provider.autocomplete("moz")
|
||||
```
|
||||
|
||||
The result will contain the autocompleted text (`result.text`), the URL (`result.url`), and the source of the match (`result.source`), which is either `DEFAULT_LIST` if a result was found in the shipped domain list or `CUSTOM_LIST` otherwise. The custom domain list takes precendece over the built-in shipped domain list and the API will only return the first match.
|
||||
|
||||
## License
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
@ -0,0 +1,40 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
defaultConfig {
|
||||
minSdkVersion config.minSdkVersion
|
||||
compileSdk config.compileSdkVersion
|
||||
targetSdkVersion config.targetSdkVersion
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
namespace 'mozilla.components.browser.domains'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':concept-toolbar')
|
||||
implementation ComponentsDependencies.kotlin_coroutines
|
||||
|
||||
testImplementation project(':support-test')
|
||||
|
||||
testImplementation ComponentsDependencies.androidx_test_junit
|
||||
testImplementation ComponentsDependencies.testing_robolectric
|
||||
testImplementation ComponentsDependencies.testing_coroutines
|
||||
}
|
||||
|
||||
apply from: '../../../android-lint.gradle'
|
||||
apply from: '../../../publish.gradle'
|
||||
ext.configurePublish(config.componentsGroupId, archivesBaseName, project.ext.description)
|
|
@ -0,0 +1 @@
|
|||
i/
|
|
@ -0,0 +1 @@
|
|||
o/debug
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
o/out
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="mozilla.components.browser.domains" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="21" />
|
||||
|
||||
</manifest>
|
|
@ -0,0 +1,5 @@
|
|||
aarFormatVersion=1.0
|
||||
aarMetadataVersion=1.0
|
||||
minCompileSdk=1
|
||||
minCompileSdkExtension=0
|
||||
minAndroidGradlePluginVersion=1.0.0
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,50 @@
|
|||
google.com.br
|
||||
youtube.com
|
||||
google.com
|
||||
facebook.com
|
||||
globo.com
|
||||
uol.com.br
|
||||
blastingnews.com
|
||||
live.com
|
||||
mercadolivre.com.br
|
||||
yahoo.com
|
||||
blogspot.com.br
|
||||
wikipedia.org
|
||||
whatsapp.com
|
||||
netflix.com
|
||||
olx.com.br
|
||||
instagram.com
|
||||
msn.com
|
||||
metropoles.com
|
||||
fatosdesconhecidos.com.br
|
||||
twitter.com
|
||||
caixa.gov.br
|
||||
uptodown.com
|
||||
aliexpress.com
|
||||
curapelanatureza.com.br
|
||||
wordpress.com
|
||||
abril.com.br
|
||||
americanas.com.br
|
||||
correios.com.br
|
||||
reclameaqui.com.br
|
||||
bet365.com
|
||||
onclkds.com
|
||||
bol.uol.com.br
|
||||
techtudo.com.br
|
||||
fazenda.gov.br
|
||||
microsoft.com
|
||||
folha.uol.com.br
|
||||
linkedin.com
|
||||
tumblr.com
|
||||
sp.gov.br
|
||||
reddit.com
|
||||
bb.com.br
|
||||
pinterest.com
|
||||
itau.com.br
|
||||
letras.mus.br
|
||||
otvfoco.com.br
|
||||
vagalume.com.br
|
||||
portalinteressante.com
|
||||
myappolicious.com.br
|
||||
thewhizmarketing.com
|
||||
twitch.tv
|
|
@ -0,0 +1,49 @@
|
|||
google.com
|
||||
youtube.com
|
||||
facebook.com
|
||||
reddit.com
|
||||
amazon.com
|
||||
wikipedia.org
|
||||
yahoo.com
|
||||
twitter.com
|
||||
netflix.com
|
||||
ebay.com
|
||||
imgur.com
|
||||
linkedin.com
|
||||
instagram.com
|
||||
diply.com
|
||||
craigslist.org
|
||||
live.com
|
||||
office.com
|
||||
twitch.tv
|
||||
tumblr.com
|
||||
pinterest.com
|
||||
espn.com
|
||||
cnn.com
|
||||
bing.com
|
||||
wikia.com
|
||||
chase.com
|
||||
imdb.com
|
||||
nytimes.com
|
||||
paypal.com
|
||||
blogspot.com
|
||||
apple.com
|
||||
yelp.com
|
||||
stackoverflow.com
|
||||
bankofamerica.com
|
||||
wordpress.com
|
||||
github.com
|
||||
microsoft.com
|
||||
wellsfargo.com
|
||||
zillow.com
|
||||
salesforce.com
|
||||
msn.com
|
||||
walmart.com
|
||||
weather.com
|
||||
dropbox.com
|
||||
buzzfeed.com
|
||||
intuit.com
|
||||
washingtonpost.com
|
||||
soundcloud.com
|
||||
huffingtonpost.com
|
||||
indeed.com
|
|
@ -0,0 +1,50 @@
|
|||
google.de
|
||||
youtube.com
|
||||
google.com
|
||||
facebook.com
|
||||
amazon.de
|
||||
ebay.de
|
||||
wikipedia.org
|
||||
ebay-kleinanzeigen.de
|
||||
web.de
|
||||
yahoo.com
|
||||
ok.ru
|
||||
gmx.net
|
||||
reddit.com
|
||||
vk.com
|
||||
t-online.de
|
||||
twitter.com
|
||||
spiegel.de
|
||||
mail.ru
|
||||
instagram.com
|
||||
live.com
|
||||
chip.de
|
||||
bild.de
|
||||
paypal.com
|
||||
bing.com
|
||||
twitch.tv
|
||||
whatsapp.com
|
||||
yandex.ru
|
||||
gutefrage.net
|
||||
mobile.de
|
||||
google.ru
|
||||
blogspot.de
|
||||
tumblr.com
|
||||
bs.to
|
||||
focus.de
|
||||
linkedin.com
|
||||
netflix.com
|
||||
wordpress.com
|
||||
imgur.com
|
||||
postbank.de
|
||||
welt.de
|
||||
streamcloud.eu
|
||||
microsoft.com
|
||||
immobilienscout24.de
|
||||
msn.com
|
||||
dict.cc
|
||||
otto.de
|
||||
xing.com
|
||||
amazon.com
|
||||
heise.de
|
||||
github.com
|
|
@ -0,0 +1,50 @@
|
|||
google.fr
|
||||
youtube.com
|
||||
google.com
|
||||
facebook.com
|
||||
wikipedia.org
|
||||
amazon.fr
|
||||
leboncoin.fr
|
||||
yahoo.com
|
||||
live.com
|
||||
twitter.com
|
||||
orange.fr
|
||||
free.fr
|
||||
linkedin.com
|
||||
lemonde.fr
|
||||
instagram.com
|
||||
reddit.com
|
||||
lefigaro.fr
|
||||
ebay.fr
|
||||
cdiscount.com
|
||||
jeuxvideo.com
|
||||
zone-telechargement.ws
|
||||
labanquepostale.fr
|
||||
blogspot.fr
|
||||
allocine.fr
|
||||
msn.com
|
||||
commentcamarche.net
|
||||
pole-emploi.fr
|
||||
vk.com
|
||||
sfr.fr
|
||||
lequipe.fr
|
||||
twitch.tv
|
||||
francetvinfo.fr
|
||||
20minutes.fr
|
||||
pinterest.com
|
||||
netflix.com
|
||||
programme-tv.net
|
||||
credit-agricole.fr
|
||||
linternaute.com
|
||||
github.com
|
||||
wordpress.com
|
||||
caf.fr
|
||||
aliexpress.com
|
||||
dailymotion.com
|
||||
tumblr.com
|
||||
t411.ai
|
||||
stackoverflow.com
|
||||
microsoft.com
|
||||
meteofrance.com
|
||||
onclkds.com
|
||||
bfmtv.com
|
|
@ -0,0 +1,49 @@
|
|||
google.co.uk
|
||||
youtube.com
|
||||
google.com
|
||||
facebook.com
|
||||
reddit.com
|
||||
bbc.co.uk
|
||||
amazon.co.uk
|
||||
wikipedia.org
|
||||
ebay.co.uk
|
||||
twitter.com
|
||||
live.com
|
||||
yahoo.com
|
||||
instagram.com
|
||||
diply.com
|
||||
linkedin.com
|
||||
imgur.com
|
||||
netflix.com
|
||||
theguardian.com
|
||||
dailymail.co.uk
|
||||
twitch.tv
|
||||
imdb.com
|
||||
paypal.com
|
||||
office.com
|
||||
tumblr.com
|
||||
www.gov.uk
|
||||
wikia.com
|
||||
givemesport.com
|
||||
amazon.com
|
||||
bing.com
|
||||
wordpress.com
|
||||
telegraph.co.uk
|
||||
rightmove.co.uk
|
||||
pinterest.com
|
||||
gumtree.com
|
||||
msn.com
|
||||
microsoft.com
|
||||
stackoverflow.com
|
||||
booking.com
|
||||
vk.com
|
||||
tripadvisor.co.uk
|
||||
lloydsbank.co.uk
|
||||
apple.com
|
||||
service.gov.uk
|
||||
onclkds.com
|
||||
github.com
|
||||
independent.co.uk
|
||||
bt.com
|
||||
vice.com
|
||||
hsbc.co.uk
|
|
@ -0,0 +1,444 @@
|
|||
google.com
|
||||
facebook.com
|
||||
amazon.com
|
||||
youtube.com
|
||||
yahoo.com
|
||||
ebay.com
|
||||
wikipedia.org
|
||||
twitter.com
|
||||
reddit.com
|
||||
go.com
|
||||
craigslist.org
|
||||
live.com
|
||||
netflix.com
|
||||
pinterest.com
|
||||
bing.com
|
||||
linkedin.com
|
||||
imgur.com
|
||||
espn.go.com
|
||||
walmart.com
|
||||
tumblr.com
|
||||
target.com
|
||||
paypal.com
|
||||
cnn.com
|
||||
chase.com
|
||||
instagram.com
|
||||
bestbuy.com
|
||||
blogspot.com
|
||||
nytimes.com
|
||||
msn.com
|
||||
imdb.com
|
||||
apple.com
|
||||
bankofamerica.com
|
||||
diply.com
|
||||
huffingtonpost.com
|
||||
yelp.com
|
||||
wellsfargo.com
|
||||
etsy.com
|
||||
weather.com
|
||||
wordpress.com
|
||||
buzzfeed.com
|
||||
zillow.com
|
||||
kohls.com
|
||||
aol.com
|
||||
homedepot.com
|
||||
foxnews.com
|
||||
microsoft.com
|
||||
comcast.net
|
||||
wikia.com
|
||||
groupon.com
|
||||
macys.com
|
||||
washingtonpost.com
|
||||
outbrain.com
|
||||
xfinity.com
|
||||
usps.com
|
||||
hulu.com
|
||||
americanexpress.com
|
||||
slickdeals.net
|
||||
pandora.com
|
||||
office.com
|
||||
cnet.com
|
||||
indeed.com
|
||||
capitalone.com
|
||||
nfl.com
|
||||
ups.com
|
||||
ask.com
|
||||
verizonwireless.com
|
||||
newegg.com
|
||||
usatoday.com
|
||||
forbes.com
|
||||
dailymail.co.uk
|
||||
dropbox.com
|
||||
att.com
|
||||
costco.com
|
||||
gfycat.com
|
||||
lowes.com
|
||||
gap.com
|
||||
about.com
|
||||
tripadvisor.com
|
||||
fedex.com
|
||||
baidu.com
|
||||
vice.com
|
||||
nordstrom.com
|
||||
adobe.com
|
||||
bbc.com
|
||||
twitch.tv
|
||||
allrecipes.com
|
||||
retailmenot.com
|
||||
stackoverflow.com
|
||||
citi.com
|
||||
sears.com
|
||||
jcpenney.com
|
||||
webmd.com
|
||||
nih.gov
|
||||
answers.com
|
||||
foodnetwork.com
|
||||
discovercard.com
|
||||
cbssports.com
|
||||
overstock.com
|
||||
businessinsider.com
|
||||
office365.com
|
||||
theguardian.com
|
||||
staples.com
|
||||
bleacherreport.com
|
||||
verizon.com
|
||||
github.com
|
||||
wayfair.com
|
||||
salesforce.com
|
||||
zulily.com
|
||||
wsj.com
|
||||
flickr.com
|
||||
goodreads.com
|
||||
realtor.com
|
||||
nbcnews.com
|
||||
ebates.com
|
||||
ancestry.com
|
||||
wunderground.com
|
||||
instructure.com
|
||||
people.com
|
||||
stackexchange.com
|
||||
drudgereport.com
|
||||
fidelity.com
|
||||
southwest.com
|
||||
deviantart.com
|
||||
thesaurus.com
|
||||
intuit.com
|
||||
woot.com
|
||||
pch.com
|
||||
soundcloud.com
|
||||
force.com
|
||||
samsclub.com
|
||||
ign.com
|
||||
qvc.com
|
||||
npr.org
|
||||
patch.com
|
||||
dell.com
|
||||
accuweather.com
|
||||
vimeo.com
|
||||
expedia.com
|
||||
trulia.com
|
||||
ca.gov
|
||||
swagbucks.com
|
||||
spotify.com
|
||||
bedbathandbeyond.com
|
||||
nypost.com
|
||||
aliexpress.com
|
||||
blackboard.com
|
||||
ticketmaster.com
|
||||
ikea.com
|
||||
feedly.com
|
||||
usaa.com
|
||||
tmz.com
|
||||
quora.com
|
||||
lifehacker.com
|
||||
kayak.com
|
||||
reference.com
|
||||
zappos.com
|
||||
gizmodo.com
|
||||
slate.com
|
||||
faithtap.com
|
||||
adp.com
|
||||
abcnews.go.com
|
||||
sephora.com
|
||||
cbs.com
|
||||
latimes.com
|
||||
shutterfly.com
|
||||
t-mobile.com
|
||||
littlethings.com
|
||||
glassdoor.com
|
||||
bloomberg.com
|
||||
cbsnews.com
|
||||
wikihow.com
|
||||
walgreens.com
|
||||
usbank.com
|
||||
blogger.com
|
||||
weebly.com
|
||||
gamestop.com
|
||||
food.com
|
||||
time.com
|
||||
kickstarter.com
|
||||
okcupid.com
|
||||
aa.com
|
||||
weather.gov
|
||||
nametests.com
|
||||
fandango.com
|
||||
engadget.com
|
||||
steamcommunity.com
|
||||
thekitchn.com
|
||||
nba.com
|
||||
mashable.com
|
||||
hp.com
|
||||
gamefaqs.com
|
||||
delta.com
|
||||
coupons.com
|
||||
eonline.com
|
||||
surveymonkey.com
|
||||
kmart.com
|
||||
barnesandnoble.com
|
||||
meetup.com
|
||||
bhphotovideo.com
|
||||
fanduel.com
|
||||
quizlet.com
|
||||
nydailynews.com
|
||||
sbnation.com
|
||||
nbcsports.com
|
||||
bbc.co.uk
|
||||
ew.com
|
||||
nike.com
|
||||
rottentomatoes.com
|
||||
steampowered.com
|
||||
reuters.com
|
||||
qq.com
|
||||
today.com
|
||||
mapquest.com
|
||||
audible.com
|
||||
priceline.com
|
||||
whitepages.com
|
||||
united.com
|
||||
myfitnesspal.com
|
||||
icloud.com
|
||||
forever21.com
|
||||
theatlantic.com
|
||||
microsoftstore.com
|
||||
theverge.com
|
||||
gawker.com
|
||||
houzz.com
|
||||
mayoclinic.org
|
||||
rei.com
|
||||
sfgate.com
|
||||
lifebuzz.com
|
||||
discover.com
|
||||
pnc.com
|
||||
pof.com
|
||||
iflscience.com
|
||||
popsugar.com
|
||||
creditkarma.com
|
||||
telegraph.co.uk
|
||||
airbnb.com
|
||||
buzzlie.com
|
||||
cnbc.com
|
||||
deadspin.com
|
||||
sina.com.cn
|
||||
legacy.com
|
||||
thedailybeast.com
|
||||
samsung.com
|
||||
nextdoor.com
|
||||
evite.com
|
||||
shopify.com
|
||||
yellowpages.com
|
||||
pcmag.com
|
||||
redfin.com
|
||||
weibo.com
|
||||
alibaba.com
|
||||
cabelas.com
|
||||
battle.net
|
||||
foxsports.com
|
||||
taobao.com
|
||||
eventbrite.com
|
||||
victoriassecret.com
|
||||
theblaze.com
|
||||
dealnews.com
|
||||
cbslocal.com
|
||||
cvs.com
|
||||
dailymotion.com
|
||||
ecollege.com
|
||||
gofundme.com
|
||||
fitbit.com
|
||||
instructables.com
|
||||
godaddy.com
|
||||
babycenter.com
|
||||
squarespace.com
|
||||
llbean.com
|
||||
dickssportinggoods.com
|
||||
6pm.com
|
||||
myway.com
|
||||
hsn.com
|
||||
wired.com
|
||||
officedepot.com
|
||||
ozztube.com
|
||||
usmagazine.com
|
||||
match.com
|
||||
cracked.com
|
||||
evernote.com
|
||||
box.com
|
||||
starbucks.com
|
||||
kbb.com
|
||||
mlb.com
|
||||
marriott.com
|
||||
si.com
|
||||
jezebel.com
|
||||
pbs.org
|
||||
consumerreports.org
|
||||
roblox.com
|
||||
urbandictionary.com
|
||||
kotaku.com
|
||||
xbox.com
|
||||
marketwatch.com
|
||||
refinery29.com
|
||||
wikimedia.org
|
||||
tvguide.com
|
||||
politico.com
|
||||
barclaycardus.com
|
||||
abc.go.com
|
||||
mint.com
|
||||
topix.com
|
||||
theblackfriday.com
|
||||
aarp.org
|
||||
hotnewhiphop.com
|
||||
yourdailydish.com
|
||||
sprint.com
|
||||
vox.com
|
||||
cafemom.com
|
||||
nbc.com
|
||||
dailykos.com
|
||||
azlyrics.com
|
||||
autotrader.com
|
||||
hilton.com
|
||||
irs.gov
|
||||
monster.com
|
||||
mailchimp.com
|
||||
webex.com
|
||||
landsend.com
|
||||
wix.com
|
||||
usnews.com
|
||||
jcrew.com
|
||||
jet.com
|
||||
capitalone360.com
|
||||
sharepoint.com
|
||||
schwab.com
|
||||
ulta.com
|
||||
vistaprint.com
|
||||
rollingstone.com
|
||||
biblegateway.com
|
||||
gamespot.com
|
||||
io9.com
|
||||
opentable.com
|
||||
hm.com
|
||||
duckduckgo.com
|
||||
chron.com
|
||||
photobucket.com
|
||||
shareasale.com
|
||||
directv.com
|
||||
avg.com
|
||||
oracle.com
|
||||
hotels.com
|
||||
timewarnercable.com
|
||||
chicagotribune.com
|
||||
ehow.com
|
||||
primewire.ag
|
||||
abs-cbnnews.com
|
||||
salon.com
|
||||
greatergood.com
|
||||
epicurious.com
|
||||
fool.com
|
||||
patheos.com
|
||||
custhelp.com
|
||||
purdue.edu
|
||||
tickld.com
|
||||
frys.com
|
||||
indiatimes.com
|
||||
amazon.co.uk
|
||||
zendesk.com
|
||||
tigerdirect.com
|
||||
stubhub.com
|
||||
healthcare.gov
|
||||
archive.org
|
||||
qualtrics.com
|
||||
ravelry.com
|
||||
cars.com
|
||||
redbox.com
|
||||
jalopnik.com
|
||||
speedtest.net
|
||||
harvard.edu
|
||||
slideshare.net
|
||||
kinja.com
|
||||
nesn.com
|
||||
michaels.com
|
||||
mit.edu
|
||||
bodybuilding.com
|
||||
edmunds.com
|
||||
nhl.com
|
||||
zergnet.com
|
||||
techcrunch.com
|
||||
pogo.com
|
||||
mozilla.org
|
||||
naver.com
|
||||
giphy.com
|
||||
bankrate.com
|
||||
msnbc.com
|
||||
digitaltrends.com
|
||||
fanfiction.net
|
||||
skype.com
|
||||
disney.go.com
|
||||
norton.com
|
||||
androidcentral.com
|
||||
tomshardware.com
|
||||
thefreedictionary.com
|
||||
liveleak.com
|
||||
247sports.com
|
||||
merriam-webster.com
|
||||
wnd.com
|
||||
earthlink.net
|
||||
independent.co.uk
|
||||
drugs.com
|
||||
rotoworld.com
|
||||
nationalgeographic.com
|
||||
ae.com
|
||||
noaa.gov
|
||||
arstechnica.com
|
||||
thinkgeek.com
|
||||
stanford.edu
|
||||
bizjournals.com
|
||||
hootsuite.com
|
||||
genius.com
|
||||
goodhousekeeping.com
|
||||
vanguard.com
|
||||
ny.gov
|
||||
citibankonline.com
|
||||
booking.com
|
||||
mic.com
|
||||
orbitz.com
|
||||
dominos.com
|
||||
medium.com
|
||||
wow.com
|
||||
urbanoutfitters.com
|
||||
douban.com
|
||||
timeanddate.com
|
||||
draftkings.com
|
||||
livestrong.com
|
||||
livingsocial.com
|
||||
cox.net
|
||||
theonion.com
|
||||
marthastewart.com
|
||||
comenity.net
|
||||
worldlifestyle.com
|
||||
disney.com
|
||||
realsimple.com
|
||||
vrbo.com
|
||||
playstation.com
|
||||
potterybarn.com
|
||||
zazzle.com
|
||||
ksl.com
|
||||
tdbank.com
|
||||
sourceforge.net
|
||||
careerbuilder.com
|
|
@ -0,0 +1,50 @@
|
|||
google.com.hk
|
||||
youtube.com
|
||||
google.com
|
||||
facebook.com
|
||||
yahoo.com
|
||||
discuss.com.hk
|
||||
aastocks.com
|
||||
wikipedia.org
|
||||
baidu.com
|
||||
taobao.com
|
||||
pixnet.net
|
||||
bastillepost.com
|
||||
nextmedia.com
|
||||
whatsapp.com
|
||||
instagram.com
|
||||
price.com.hk
|
||||
ettoday.net
|
||||
qq.com
|
||||
hsbc.com.hk
|
||||
tmall.com
|
||||
live.com
|
||||
hkgolden.com
|
||||
reddit.com
|
||||
beautyexchange.com.hk
|
||||
etnet.com.hk
|
||||
on.cc
|
||||
amazon.com
|
||||
twitter.com
|
||||
uwants.com
|
||||
presslogic.com
|
||||
unwire.hk
|
||||
gamer.com.tw
|
||||
hangseng.com
|
||||
hk01.com
|
||||
twitch.tv
|
||||
linkedin.com
|
||||
teepr.com
|
||||
hkjc.com
|
||||
apple.com
|
||||
bomb01.com
|
||||
sina.com.cn
|
||||
weibo.com
|
||||
dcfever.com
|
||||
thestandnews.com
|
||||
office.com
|
||||
openrice.com
|
||||
tumblr.com
|
||||
tvb.com
|
||||
alipay.com
|
||||
stackoverflow.com
|
|
@ -0,0 +1,50 @@
|
|||
google.com
|
||||
google.co.id
|
||||
youtube.com
|
||||
detik.com
|
||||
tribunnews.com
|
||||
facebook.com
|
||||
yahoo.com
|
||||
tokopedia.com
|
||||
liputan6.com
|
||||
kompas.com
|
||||
bukalapak.com
|
||||
kaskus.co.id
|
||||
kapanlagi.com
|
||||
wordpress.com
|
||||
merdeka.com
|
||||
okezone.com
|
||||
elevenia.co.id
|
||||
lazada.co.id
|
||||
uzone.id
|
||||
bintang.com
|
||||
brilio.net
|
||||
popads.net
|
||||
instagram.com
|
||||
bola.net
|
||||
wikipedia.org
|
||||
blogspot.com
|
||||
onclkds.com
|
||||
dream.co.id
|
||||
viva.co.id
|
||||
alodokter.com
|
||||
tempo.co
|
||||
suara.com
|
||||
wowkeren.com
|
||||
idntimes.com
|
||||
bola.com
|
||||
sindonews.com
|
||||
republika.co.id
|
||||
kompasiana.com
|
||||
vemale.com
|
||||
blanja.com
|
||||
cnnindonesia.com
|
||||
olx.co.id
|
||||
lk21.org
|
||||
popcash.net
|
||||
blibli.com
|
||||
poptm.com
|
||||
nonton.movie
|
||||
indexmovie.me
|
||||
adexchangeprediction.com
|
||||
subscene.com
|
|
@ -0,0 +1,50 @@
|
|||
google.pl
|
||||
youtube.com
|
||||
facebook.com
|
||||
google.com
|
||||
allegro.pl
|
||||
onet.pl
|
||||
wp.pl
|
||||
wikipedia.org
|
||||
olx.pl
|
||||
vk.com
|
||||
interia.pl
|
||||
wykop.pl
|
||||
gazeta.pl
|
||||
filmweb.pl
|
||||
instagram.com
|
||||
wiocha.pl
|
||||
cda.pl
|
||||
aliexpress.com
|
||||
otomoto.pl
|
||||
mbank.pl
|
||||
reddit.com
|
||||
ceneo.pl
|
||||
tvn24.pl
|
||||
twitter.com
|
||||
gumtree.pl
|
||||
blogspot.com
|
||||
kwejk.pl
|
||||
wyborcza.pl
|
||||
joemonster.org
|
||||
stackoverflow.com
|
||||
twitch.tv
|
||||
o2.pl
|
||||
ipko.pl
|
||||
steamcommunity.com
|
||||
github.com
|
||||
chomikuj.pl
|
||||
centrum24.pl
|
||||
linkedin.com
|
||||
money.pl
|
||||
librus.pl
|
||||
demotywatory.pl
|
||||
sport.pl
|
||||
microsoft.com
|
||||
zalukaj.com
|
||||
wikia.com
|
||||
jbzdy.pl
|
||||
imgur.com
|
||||
flashscore.pl
|
||||
gry-online.pl
|
||||
pudelek.pl
|
|
@ -0,0 +1,50 @@
|
|||
vk.com
|
||||
google.ru
|
||||
yandex.ru
|
||||
youtube.com
|
||||
mail.ru
|
||||
ok.ru
|
||||
google.com
|
||||
avito.ru
|
||||
aliexpress.com
|
||||
wikipedia.org
|
||||
instagram.com
|
||||
sberbank.ru
|
||||
gismeteo.ru
|
||||
rambler.ru
|
||||
kinogo.club
|
||||
kinopoisk.ru
|
||||
drom.ru
|
||||
facebook.com
|
||||
pikabu.ru
|
||||
drive2.ru
|
||||
rutracker.org
|
||||
twitch.tv
|
||||
rbc.ru
|
||||
hh.ru
|
||||
gosuslugi.ru
|
||||
lenta.ru
|
||||
pochta.ru
|
||||
wildberries.ru
|
||||
wikia.com
|
||||
4pda.ru
|
||||
fb.ru
|
||||
seasonvar.ru
|
||||
kp.ru
|
||||
znanija.com
|
||||
ucoz.ru
|
||||
narod.ru
|
||||
mts.ru
|
||||
infourok.ru
|
||||
ebay.com
|
||||
ozon.ru
|
||||
worldoftanks.ru
|
||||
mos.ru
|
||||
vesti.ru
|
||||
nnmclub.to
|
||||
microsoft.com
|
||||
rp5.ru
|
||||
2gis.ru
|
||||
consultant.ru
|
||||
fotostrana.ru
|
||||
dnevnik.ru
|
|
@ -0,0 +1,49 @@
|
|||
google.com.sg
|
||||
youtube.com
|
||||
google.com
|
||||
facebook.com
|
||||
yahoo.com
|
||||
wikipedia.org
|
||||
reddit.com
|
||||
blogspot.sg
|
||||
live.com
|
||||
instagram.com
|
||||
qoo10.sg
|
||||
whatsapp.com
|
||||
linkedin.com
|
||||
dbs.com.sg
|
||||
amazon.com
|
||||
twitter.com
|
||||
wordpress.com
|
||||
onclkds.com
|
||||
office.com
|
||||
allsingaporestuff.com
|
||||
baidu.com
|
||||
lazada.sg
|
||||
straitstimes.com
|
||||
singpass.gov.sg
|
||||
google.co.id
|
||||
taobao.com
|
||||
tumblr.com
|
||||
gomovies.to
|
||||
wikia.com
|
||||
hardwarezone.com.sg
|
||||
nus.edu.sg
|
||||
msn.com
|
||||
microsoft.com
|
||||
carousell.com
|
||||
kissanime.ru
|
||||
ocbc.com
|
||||
stackoverflow.com
|
||||
ntu.edu.sg
|
||||
thepiratebay.org
|
||||
aliexpress.com
|
||||
imgur.com
|
||||
dropbox.com
|
||||
apple.com
|
||||
channelnewsasia.com
|
||||
imdb.com
|
||||
twitch.tv
|
||||
abs-cbn.com
|
||||
jobstreet.com.sg
|
||||
uob.com.sg
|
|
@ -0,0 +1,50 @@
|
|||
google.com.tw
|
||||
pixnet.net
|
||||
youtube.com
|
||||
facebook.com
|
||||
ettoday.net
|
||||
google.com
|
||||
yahoo.com
|
||||
ltn.com.tw
|
||||
nownews.com
|
||||
setn.com
|
||||
momoshop.com.tw
|
||||
wikipedia.org
|
||||
ck101.com
|
||||
ptt.cc
|
||||
tvbs.com.tw
|
||||
104.com.tw
|
||||
gamer.com.tw
|
||||
appledaily.com.tw
|
||||
pchome.com.tw
|
||||
ruten.com.tw
|
||||
ctitv.com.tw
|
||||
teepr.com
|
||||
life.tw
|
||||
blogspot.tw
|
||||
dcard.tw
|
||||
baidu.com
|
||||
udn.com
|
||||
mobile01.com
|
||||
eyny.com
|
||||
epochtimes.com
|
||||
qoolquiz.com
|
||||
bomb01.com
|
||||
talk.tw
|
||||
ipetgroup.com
|
||||
storm.mg
|
||||
123kubo.com
|
||||
cmoney.tw
|
||||
taobao.com
|
||||
twitch.tv
|
||||
instagram.com
|
||||
xuite.net
|
||||
sina.com.tw
|
||||
1111.com.tw
|
||||
businessweekly.com.tw
|
||||
elle.com.tw
|
||||
twitter.com
|
||||
books.com.tw
|
||||
591.com.tw
|
||||
everydayhealth.com.tw
|
||||
techbang.com
|
|
@ -0,0 +1,49 @@
|
|||
google.com
|
||||
youtube.com
|
||||
facebook.com
|
||||
reddit.com
|
||||
amazon.com
|
||||
wikipedia.org
|
||||
yahoo.com
|
||||
twitter.com
|
||||
netflix.com
|
||||
ebay.com
|
||||
imgur.com
|
||||
linkedin.com
|
||||
instagram.com
|
||||
diply.com
|
||||
craigslist.org
|
||||
live.com
|
||||
office.com
|
||||
twitch.tv
|
||||
tumblr.com
|
||||
pinterest.com
|
||||
espn.com
|
||||
cnn.com
|
||||
bing.com
|
||||
wikia.com
|
||||
chase.com
|
||||
imdb.com
|
||||
nytimes.com
|
||||
paypal.com
|
||||
blogspot.com
|
||||
apple.com
|
||||
yelp.com
|
||||
stackoverflow.com
|
||||
bankofamerica.com
|
||||
wordpress.com
|
||||
github.com
|
||||
microsoft.com
|
||||
wellsfargo.com
|
||||
zillow.com
|
||||
salesforce.com
|
||||
msn.com
|
||||
walmart.com
|
||||
weather.com
|
||||
dropbox.com
|
||||
buzzfeed.com
|
||||
intuit.com
|
||||
washingtonpost.com
|
||||
soundcloud.com
|
||||
huffingtonpost.com
|
||||
indeed.com
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
o/debug
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Automatically generated file. DO NOT MODIFY
|
||||
*/
|
||||
package mozilla.components.browser.domains;
|
||||
|
||||
public final class BuildConfig {
|
||||
public static final boolean DEBUG = Boolean.parseBoolean("true");
|
||||
public static final String LIBRARY_PACKAGE_NAME = "mozilla.components.browser.domains";
|
||||
public static final String BUILD_TYPE = "debug";
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Automatically generated file. DO NOT MODIFY
|
||||
*/
|
||||
package mozilla.components.browser.domains;
|
||||
|
||||
public final class BuildConfig {
|
||||
public static final boolean DEBUG = false;
|
||||
public static final String LIBRARY_PACKAGE_NAME = "mozilla.components.browser.domains";
|
||||
public static final String BUILD_TYPE = "release";
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="mozilla.components.browser.domains" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="21" />
|
||||
|
||||
</manifest>
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "mozilla.components.browser.domains",
|
||||
"variantName": "debug",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"outputFile": "AndroidManifest.xml"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="mozilla.components.browser.domains" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="21" />
|
||||
|
||||
</manifest>
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "mozilla.components.browser.domains",
|
||||
"variantName": "release",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"outputFile": "AndroidManifest.xml"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,5 @@
|
|||
aarFormatVersion=1.0
|
||||
aarMetadataVersion=1.0
|
||||
minCompileSdk=1
|
||||
minCompileSdkExtension=0
|
||||
minAndroidGradlePluginVersion=1.0.0
|
|
@ -0,0 +1,5 @@
|
|||
aarFormatVersion=1.0
|
||||
aarMetadataVersion=1.0
|
||||
minCompileSdk=1
|
||||
minCompileSdkExtension=0
|
||||
minAndroidGradlePluginVersion=1.0.0
|
|
@ -0,0 +1 @@
|
|||
{}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue