Use stable Build UUIDs

pull/214/head
M66B 1 year ago
parent ff4fec834b
commit de715fea68

@ -176,6 +176,7 @@ android {
github {
dimension "all"
manifestPlaceholders.largeHeap = false
manifestPlaceholders.build_uuid = UUID.nameUUIDFromBytes((archivesBaseName + "github").getBytes()).toString();
buildConfigField "boolean", "TEST_RELEASE", "false"
buildConfigField "boolean", "BETA_RELEASE", "true"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
@ -202,6 +203,7 @@ android {
large {
dimension "all"
manifestPlaceholders.largeHeap = true
manifestPlaceholders.build_uuid = UUID.nameUUIDFromBytes((archivesBaseName + "large").getBytes()).toString();
buildConfigField "boolean", "TEST_RELEASE", "false"
buildConfigField "boolean", "BETA_RELEASE", "true"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
@ -228,6 +230,7 @@ android {
fdroid {
dimension "all"
manifestPlaceholders.largeHeap = false
manifestPlaceholders.build_uuid = UUID.nameUUIDFromBytes((archivesBaseName + "fdroid").getBytes()).toString();
externalNativeBuild {
cmake {
arguments "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--build-id=none"
@ -264,6 +267,7 @@ android {
dimension "all"
//minSdkVersion 23
manifestPlaceholders.largeHeap = false
manifestPlaceholders.build_uuid = UUID.nameUUIDFromBytes((archivesBaseName + "play").getBytes()).toString();
buildConfigField "boolean", "TEST_RELEASE", "false"
buildConfigField "boolean", "BETA_RELEASE", "true"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "true"
@ -291,6 +295,7 @@ android {
dimension "all"
minSdkVersion 23
manifestPlaceholders.largeHeap = false
manifestPlaceholders.build_uuid = UUID.nameUUIDFromBytes((archivesBaseName + "amazon").getBytes()).toString();
buildConfigField "boolean", "TEST_RELEASE", "false"
buildConfigField "boolean", "BETA_RELEASE", "true"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"

@ -155,9 +155,6 @@
<meta-data
android:name="com.bugsnag.android.API_KEY"
android:value="9d2d57476a0614974449a3ec33f2604a" />
<meta-data
android:name="com.bugsnag.android.BUILD_UUID"
android:value="00000000-0000-0000-0000-000000000000" />
<activity
android:name=".ActivityMain"

@ -148,6 +148,9 @@
<meta-data
android:name="com.bugsnag.android.API_KEY"
android:value="9d2d57476a0614974449a3ec33f2604a" />
<meta-data
android:name="com.bugsnag.android.BUILD_UUID"
android:value="${build_uuid}" />
<activity
android:name=".ActivityMain"

@ -2023,6 +2023,14 @@ public class Log {
sb.append(String.format("UUID: %s\r\n", uuid == null ? "-" : uuid));
}
try {
ApplicationInfo app = pm.getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA);
String build_uuid = app.metaData.getString("com.bugsnag.android.BUILD_UUID");
sb.append(String.format("Build UUID: %s\r\n", build_uuid == null ? "-" : build_uuid));
} catch (PackageManager.NameNotFoundException ex) {
Log.e(ex);
}
sb.append(String.format("Release: %s\r\n", getReleaseType(context)));
sb.append(String.format("Play Store: %s\r\n", Helper.hasPlayStore(context)));
sb.append(String.format("Installer: %s\r\n", installer));

Loading…
Cancel
Save