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

Commit

Permalink
Fixes #618 Support debug and release builds on device simultaneously (#…
Browse files Browse the repository at this point in the history
…908)

* Fixes #618 Support debug and release builds on device simultaneously

* Enable the applicationID sufix via user.properties option
  • Loading branch information
keianhzo authored and MortimerGoro committed Jan 18, 2019
1 parent ad0b9a1 commit 6e5bb72
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 3 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ geckoViewLocalArm=/path/to/your/build/geckoview-nightly-armeabi-v7a-64.0.2018092
geckoViewLocalX86=/path/to/your/build/geckoview-nightly-x86-64.0.20180924100359.aar
```

## Install debug and release builds on device simultaneously

You can enable a debug applicationID sufix to install both debug and release builds simultaneously. You just need to add this property to your `user.properties` file:

```ini
simultaneousDebugRelease=true
```

## Compress assets

ETC2 compression is used to improve performance and memory usage. Raw assets are placed in the `uncompressed_assets` folder. You can generate the compressed textures using the compressor utility in `tools/compressor`. You need to set up [etc2comp](https://github.com/google/etc2comp) and make it available on your PATH before running the script. Run this command to generate the compressed assets:
Expand Down
8 changes: 8 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ def getCrashRestartDisabled = { ->
return "false"
}

def getDebugApplicationIdSufix = { ->
if (gradle.hasProperty("simultaneousDebugRelease")) {
return gradle.simultaneousDebugRelease == "true" ? ".dev" : ""
}
return ""
}

android {
compileSdkVersion build_versions.target_sdk
defaultConfig {
Expand Down Expand Up @@ -62,6 +69,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
applicationIdSuffix getDebugApplicationIdSufix()
pseudoLocalesEnabled true
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class CrashReporterService extends JobIntentService {

private static final String LOGTAG = "VRB";

public static final String CRASH_ACTION = "org.mozilla.vrbrowser.CRASH_ACTION";
public static final String CRASH_ACTION = BuildConfig.APPLICATION_ID + ".CRASH_ACTION";
public static final String DATA_TAG = "intent";

private static final int PID_CHECK_INTERVAL = 100;
Expand Down
Binary file added app/src/debug/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/debug/res/drawable/ff_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/debug/res/drawable/ff_logo_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions app/src/debug/res/values/non_L10n.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<resources>
<string name="app_name" translatable="false">Firefox Reality (Dev)</string>
</resources>
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="org.mozilla.vrbrowser.CRASH_RECEIVER_PERMISSION"/>
<uses-permission android:name="${applicationId}.CRASH_RECEIVER_PERMISSION"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<permission android:name="org.mozilla.vrbrowser.CRASH_RECEIVER_PERMISSION"
<permission android:name="${applicationId}.CRASH_RECEIVER_PERMISSION"
android:protectionLevel="signature"/>

<application
Expand Down

0 comments on commit 6e5bb72

Please sign in to comment.