Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into clear_before_composite
Browse files Browse the repository at this point in the history
  • Loading branch information
bluemarvin authored Sep 17, 2019
2 parents 945e1db + 5d08acb commit 9a1dd36
Show file tree
Hide file tree
Showing 130 changed files with 2,409 additions and 1,241 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ infer-out/
fastlane/

app/.externalNativeBuild
app/.cxx
openwnn/.externalNativeBuild

*.swp
Expand Down
246 changes: 123 additions & 123 deletions .taskcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,49 @@
# 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/.

version: 0
allowPullRequests: public
version: 1
policy:
pullRequests: public
tasks:
$let:
repository:
$if: 'tasks_for == "github-pull-request"'
then: ${event.pull_request.head.repo.clone_url}
else: ${event.repository.clone_url}

in:
###############################################################################
# Task: Pull requests
#
# Triggered whenever a pull request is opened or updated.
#
# - Builds NoAPI and GoogleVR flavors
###############################################################################
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
extra:
github:
events:
- pull_request.opened
- pull_request.edited
- pull_request.synchronize
- pull_request.reopened
payload:
maxRunTime: 14400
image: 'mozillamixedreality/firefoxreality:190312'
command:
- /bin/bash
- '--login'
- '-cx'
- >-
git fetch {{ event.head.repo.url }} {{ event.head.repo.branch }}
&& git config advice.detachedHead false
&& git checkout {{event.head.sha}}
&& rm -rf gvr-android-sdk && git clone https://github.com/MozillaReality/FirefoxReality-gvr-android-sdk.git gvr-android-sdk
&& git submodule update
&& ./gradlew --no-daemon --console=plain clean assembleNoapi assembleGooglevr
metadata:
name: Firefox Reality for Android - Build - Pull Request
description: Building Firefox Reality for Android (via Gradle) - triggered by a pull request.
owner: '{{ event.head.user.email }}'
source: '{{ event.head.repo.url }}'
- $if: 'tasks_for == "github-pull-request" && event["action"] in ["opened", "edited", "reopened", "synchronize"]'
then:
provisionerId: 'aws-provisioner-v1'
workerType: 'github-worker'
deadline: {$fromNow: 1 day}
expires: {$fromNow: 1 year}
payload:
maxRunTime: 14400
image: 'mozillamixedreality/firefoxreality:190312'
command:
- /bin/bash
- '--login'
- '-cx'
- >-
git fetch ${repository} ${event.pull_request.head.ref}
&& git config advice.detachedHead false
&& git checkout ${event.pull_request.head.sha}
&& rm -rf gvr-android-sdk && git clone https://github.com/MozillaReality/FirefoxReality-gvr-android-sdk.git gvr-android-sdk
&& git submodule update
&& ./gradlew --no-daemon --console=plain clean assembleNoapi assembleGooglevr
metadata:
name: Firefox Reality for Android - Build - Pull Request
description: Building Firefox Reality for Android (via Gradle) - triggered by a pull request.
owner: noreply@mozilla.com
source: ${repository}
###############################################################################
# Task: Master builds
#
Expand All @@ -48,103 +53,98 @@ tasks:
# testing only and should not be uploaded to App Stores.
#
###############################################################################
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
extra:
github:
env: true
events:
- push
branches:
- master
scopes:
- "secrets:get:project/firefoxreality/github-deploy-key"
- "secrets:get:project/firefoxreality/staging-signing-token"
- "secrets:get:project/firefoxreality/symbols-token"
routes:
- notify.email.fxr-releng@mozilla.com.on-any
payload:
maxRunTime: 14400
image: 'mozillamixedreality/firefoxreality:190312'
features:
taskclusterProxy: true
command:
- /bin/bash
- '--login'
- '-cx'
- >-
git fetch origin
&& git config advice.detachedHead false
&& git rebase origin/master
&& rm -rf gvr-android-sdk && git clone https://github.com/MozillaReality/FirefoxReality-gvr-android-sdk.git gvr-android-sdk
&& git submodule update
&& . tools/taskcluster/get_third_party.sh
&& cp tools/gradle/taskcluster.properties ./user.properties
&& ./gradlew --no-daemon --console=plain clean `python tools/taskcluster/build_targets.py =all`
&& python tools/taskcluster/fetch_secret.py -s project/firefoxreality/staging-signing-token -o token -n token
&& python tools/taskcluster/sign_apk.py -t token
&& python tools/taskcluster/archive_debug_apk.py
&& . tools/taskcluster/upload_symbols.sh
artifacts:
'public':
type: 'directory'
path: '/opt/FirefoxReality/builds/'
expires: "{{ '1 month' | $fromNow }}"
metadata:
name: Firefox Reality for Android - Build - Master update
description: Building Firefox Reality for Android (via Gradle) - triggered by update to master
owner: '{{ event.head.user.email }}'
source: '{{ event.head.repo.url }}'
- $if: 'tasks_for == "github-push" && event["ref"] == "refs/heads/master"'
then:
provisionerId: 'aws-provisioner-v1'
workerType: 'github-worker'
deadline: {$fromNow: 1 day}
expires: {$fromNow: 1 year}
scopes:
- "secrets:get:project/firefoxreality/github-deploy-key"
- "secrets:get:project/firefoxreality/staging-signing-token"
- "secrets:get:project/firefoxreality/symbols-token"
routes:
- notify.email.fxr-releng@mozilla.com.on-any
payload:
maxRunTime: 14400
image: 'mozillamixedreality/firefoxreality:190312'
features:
taskclusterProxy: true
command:
- /bin/bash
- '--login'
- '-cx'
- >-
git fetch origin
&& git config advice.detachedHead false
&& git rebase origin/master
&& rm -rf gvr-android-sdk && git clone https://github.com/MozillaReality/FirefoxReality-gvr-android-sdk.git gvr-android-sdk
&& git submodule update
&& . tools/taskcluster/get_third_party.sh
&& cp tools/gradle/taskcluster.properties ./user.properties
&& ./gradlew --no-daemon --console=plain clean `python tools/taskcluster/build_targets.py =all`
&& python tools/taskcluster/fetch_secret.py -s project/firefoxreality/staging-signing-token -o token -n token
&& python tools/taskcluster/sign_apk.py -t token
&& python tools/taskcluster/archive_debug_apk.py
&& . tools/taskcluster/upload_symbols.sh
artifacts:
'public':
type: 'directory'
path: '/opt/FirefoxReality/builds/'
expires: {$fromNow: '1 month'}
metadata:
name: Firefox Reality for Android - Build - Master update
description: Building Firefox Reality for Android (via Gradle) - triggered by update to master
owner: noreply@mozilla.com
source: ${repository}
###############################################################################
# Task: Release builds
#
# Triggered when a new release is tagged. Produces signed release APKs.
#
# NOTE: {{ event.version }} is the string used to tag the release.
#
###############################################################################
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
extra:
github:
events:
- release
scopes:
- "secrets:get:project/firefoxreality/github-deploy-key"
- "secrets:get:project/firefoxreality/release-signing-token"
- "secrets:get:project/firefoxreality/symbols-token"
routes:
- notify.email.fxr-releng@mozilla.com.on-any
payload:
maxRunTime: 14400
image: 'mozillamixedreality/firefoxreality:190312'
features:
taskclusterProxy: true
command:
- /bin/bash
- '--login'
- '-cx'
- >-
git fetch origin
&& git config advice.detachedHead false
&& git checkout {{ event.version }}
&& rm -rf gvr-android-sdk && git clone https://github.com/MozillaReality/FirefoxReality-gvr-android-sdk.git gvr-android-sdk
&& git submodule update
&& . tools/taskcluster/get_third_party.sh
&& cp tools/gradle/taskcluster.properties ./user.properties
&& ./gradlew --no-daemon --console=plain clean `python tools/taskcluster/build_targets.py {{ event.version }}`
&& python tools/taskcluster/fetch_secret.py -s project/firefoxreality/release-signing-token -o token -n token
&& python tools/taskcluster/sign_apk.py -t token -r
&& python tools/taskcluster/archive_debug_apk.py
&& . tools/taskcluster/upload_symbols.sh
artifacts:
'public':
type: 'directory'
path: '/opt/FirefoxReality/builds/'
expires: "{{ '1 year' | $fromNow }}"
metadata:
name: Firefox Reality for Android - Release Build ({{ event.version }})
description: Building Firefox Reality for Android (via Gradle) - triggered by release
owner: '{{ event.head.user.email }}'
source: '{{ event.head.repo.url }}'
- $if: 'tasks_for == "github-release"'
then:
provisionerId: 'aws-provisioner-v1'
workerType: 'github-worker'
deadline: {$fromNow: 1 day}
expires: {$fromNow: 1 year}
scopes:
- "secrets:get:project/firefoxreality/github-deploy-key"
- "secrets:get:project/firefoxreality/release-signing-token"
- "secrets:get:project/firefoxreality/symbols-token"
routes:
- notify.email.fxr-releng@mozilla.com.on-any
payload:
maxRunTime: 14400
image: 'mozillamixedreality/firefoxreality:190312'
features:
taskclusterProxy: true
command:
- /bin/bash
- '--login'
- '-cx'
- >-
git fetch origin
&& git config advice.detachedHead false
&& git checkout ${event.release.tag_name}
&& rm -rf gvr-android-sdk && git clone https://github.com/MozillaReality/FirefoxReality-gvr-android-sdk.git gvr-android-sdk
&& git submodule update
&& . tools/taskcluster/get_third_party.sh
&& cp tools/gradle/taskcluster.properties ./user.properties
&& ./gradlew --no-daemon --console=plain clean `python tools/taskcluster/build_targets.py ${event.release.tag_name}`
&& python tools/taskcluster/fetch_secret.py -s project/firefoxreality/release-signing-token -o token -n token
&& python tools/taskcluster/sign_apk.py -t token -r
&& python tools/taskcluster/archive_debug_apk.py
&& . tools/taskcluster/upload_symbols.sh
artifacts:
'public':
type: 'directory'
path: '/opt/FirefoxReality/builds/'
expires: {$fromNow: '1 year'}
metadata:
name: Firefox Reality for Android - Release Build (${event.release.tag_name})
description: Building Firefox Reality for Android (via Gradle) - triggered by release
owner: noreply@mozilla.com
source: ${repository}

27 changes: 11 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,19 @@ cp ./extra/wavesdk/build.gradle ./third_party/wavesdk

Make certain to set the build flavor to `wavevrDebug` in Android Studio before building the project.

## Using a custom GeckoView
## Local Development

Create a file called `user.properties` in the top-level project directory. Add a variable called `geckoViewLocalArm` and `geckoViewLocalX86` and set it to the location of your locally built AAR:
### Dependency substitutions

You might be interested in building this project against local versions of some of the dependencies.
This could be done either by using a [local maven repository](https://mozilla-mobile.github.io/android-components/contributing/testing-components-inside-app) (quite cumbersome), or via Gradle's [dependency substitutions](https://docs.gradle.org/current/userguide/customizing_dependency_resolution_behavior.html) (not at all cumbersome!).

Currently, the substitution flow is streamlined for some of the core dependencies via configuration flags in `local.properties`. You can build against a local checkout of the following dependencies by specifying their local paths:
- [GeckoView](https://hg.mozilla.org/mozilla-central), specifying its path via `dependencySubstitutions.geckoviewTopsrcdir=/path/to/mozilla-central` (and, optionally, `dependencySubstitutions.geckoviewTopobjdir=/path/to/topobjdir`). See [Bug 1533465](https://bugzilla.mozilla.org/show_bug.cgi?id=1533465).
- This assumes that you have built, packaged, and published your local GeckoView -- but don't worry, the dependency substitution script has the latest instructions for doing that.

Do not forget to run a Gradle sync in Android Studio after changing `local.properties`. If you specified any substitutions, they will be reflected in the modules list, and you'll be able to modify them from a single Android Studio window.

```ini
geckoViewLocalArm=/path/to/your/build/geckoview-nightly-armeabi-v7a-64.0.20180924100359.aar
geckoViewLocalX86=/path/to/your/build/geckoview-nightly-x86-64.0.20180924100359.aar
```

## Install dev and production builds on device simultaneously

Expand Down Expand Up @@ -142,16 +147,6 @@ npm run compress

Enable [USB Remote Debugging](https://github.com/MozillaReality/FirefoxReality/wiki/Developer-Info#remote-debugging) on the device.

### `Could not get unknown property 'geckoViewLocal' for build 'FirefoxReality'[...]`

```bash
./mach build
./mach package
./mach android archive-geckoview
find $objdir -name *.aar
echo "geckoViewLocalArm=$objdir/gradle/build/mobile/android/geckoview/outputs/aar/geckoview-official-withGeckoBinaries-noMinApi-release.aar" > $FirefoxReality/user.properties
```

### **`Firefox > Web Developer > WebIDE > Performance`** gets stuck with greyed out "stop and show profile"

Restart FxR and close and re-open the WebIDE page.
Expand Down
Loading

0 comments on commit 9a1dd36

Please sign in to comment.