Skip to content

Commit 6e5bb72

Browse files
keianhzoMortimerGoro
authored andcommitted
Fixes Igalia#618 Support debug and release builds on device simultaneously (Igalia#908)
* Fixes Igalia#618 Support debug and release builds on device simultaneously * Enable the applicationID sufix via user.properties option
1 parent ad0b9a1 commit 6e5bb72

File tree

8 files changed

+22
-3
lines changed

8 files changed

+22
-3
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@ geckoViewLocalArm=/path/to/your/build/geckoview-nightly-armeabi-v7a-64.0.2018092
105105
geckoViewLocalX86=/path/to/your/build/geckoview-nightly-x86-64.0.20180924100359.aar
106106
```
107107

108+
## Install debug and release builds on device simultaneously
109+
110+
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:
111+
112+
```ini
113+
simultaneousDebugRelease=true
114+
```
115+
108116
## Compress assets
109117

110118
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:

app/build.gradle

+8
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ def getCrashRestartDisabled = { ->
1717
return "false"
1818
}
1919

20+
def getDebugApplicationIdSufix = { ->
21+
if (gradle.hasProperty("simultaneousDebugRelease")) {
22+
return gradle.simultaneousDebugRelease == "true" ? ".dev" : ""
23+
}
24+
return ""
25+
}
26+
2027
android {
2128
compileSdkVersion build_versions.target_sdk
2229
defaultConfig {
@@ -62,6 +69,7 @@ android {
6269
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
6370
}
6471
debug {
72+
applicationIdSuffix getDebugApplicationIdSufix()
6573
pseudoLocalesEnabled true
6674
}
6775
}

app/src/common/shared/org/mozilla/vrbrowser/crashreporting/CrashReporterService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class CrashReporterService extends JobIntentService {
1919

2020
private static final String LOGTAG = "VRB";
2121

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

2525
private static final int PID_CHECK_INTERVAL = 100;

app/src/debug/assets/logo.png

84.2 KB
Loading
65.3 KB
Loading
28.9 KB
Loading

app/src/debug/res/values/non_L10n.xml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<string name="app_name" translatable="false">Firefox Reality (Dev)</string>
3+
</resources>

app/src/main/AndroidManifest.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
77
<uses-permission android:name="android.permission.CAMERA"/>
88
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
9-
<uses-permission android:name="org.mozilla.vrbrowser.CRASH_RECEIVER_PERMISSION"/>
9+
<uses-permission android:name="${applicationId}.CRASH_RECEIVER_PERMISSION"/>
1010
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
1111
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
1212

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

1616
<application

0 commit comments

Comments
 (0)