Skip to content

Commit feb73d3

Browse files
committed
chore: add internal testing build script to enable bugsnag reporting easier
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent 6efe112 commit feb73d3

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

api/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import org.jetbrains.kotlin.cli.common.toBooleanLenient
12
import java.util.Properties
23

34
plugins {
@@ -30,7 +31,7 @@ android {
3031
buildConfigField("Boolean", "NOTIFY_ERRORS", "true")
3132
}
3233
getByName("debug") {
33-
buildConfigField("Boolean", "NOTIFY_ERRORS", "false")
34+
buildConfigField("Boolean", "NOTIFY_ERRORS", (System.getenv("NOTIFY_ERRORS").toBooleanLenient() ?: false).toString())
3435
}
3536
}
3637

scripts/internal-testing-build.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
date="$(date '+%m.%d.%y')"
4+
5+
export NOTIFY_ERRORS=true
6+
./gradlew assembleDebug
7+
8+
outputDir="$(pwd)/app/build/outputs/apk/debug"
9+
mv "${outputDir}/app-debug.apk" "${outputDir}/app-${date}-debug.apk"
10+
11+
unset NOTIFY_ERRORS

0 commit comments

Comments
 (0)