fix: tasker launch of shortcuts (#290)

This commit is contained in:
Zane Schepke
2024-07-29 17:14:08 -04:00
committed by GitHub
parent a5e9aa83b8
commit 594834a908
6 changed files with 50 additions and 28 deletions
+17 -10
View File
@@ -60,6 +60,10 @@ android {
}
debug { isDebuggable = true }
create(Constants.PRERELEASE) {
initWith(buildTypes.getByName(Constants.RELEASE))
}
create(Constants.NIGHTLY) {
initWith(buildTypes.getByName(Constants.RELEASE))
}
@@ -184,19 +188,22 @@ dependencies {
}
fun determineVersionCode(): Int {
return if (isNightlyBuild()) {
Constants.VERSION_CODE +
Constants.NIGHTLY_CODE
} else {
Constants.VERSION_CODE
return with(getBuildTaskName().lowercase()) {
when {
contains(Constants.NIGHTLY) -> Constants.VERSION_CODE + Constants.NIGHTLY_CODE
contains(Constants.PRERELEASE) -> Constants.VERSION_CODE + Constants.PRERELEASE_CODE
else -> Constants.VERSION_CODE
}
}
}
fun determineVersionName(): String {
return if (isNightlyBuild()) {
Constants.VERSION_NAME +
"-${grgitService.service.get().grgit.head().abbreviatedId}"
} else {
Constants.VERSION_NAME
return with(getBuildTaskName().lowercase()) {
when {
contains(Constants.NIGHTLY) || contains(Constants.PRERELEASE) ->
Constants.VERSION_NAME +
"-${grgitService.service.get().grgit.head().abbreviatedId}"
else -> Constants.VERSION_NAME
}
}
}
+6 -2
View File
@@ -86,11 +86,15 @@
android:name="com.journeyapps.barcodescanner.CaptureActivity"
android:screenOrientation="portrait"
tools:replace="screenOrientation" />
<activity
android:name=".service.shortcut.ShortcutsActivity"
android:enabled="true"
android:exported="true"
android:finishOnTaskLaunch="true"
android:noHistory="true"
android:excludeFromRecents="true"
android:finishOnTaskLaunch="true"
android:launchMode="singleInstance"
android:theme="@android:style/Theme.NoDisplay" />
<service
@@ -174,4 +178,4 @@
android:name=".receiver.NotificationActionReceiver"
android:exported="false" />
</application>
</manifest>
</manifest>