From f82229258477e1fb7465da90476dc2aad0401248 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Sat, 27 Jul 2024 07:54:52 -0400 Subject: [PATCH] fix: nightly check --- buildSrc/src/main/kotlin/Extensions.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/Extensions.kt b/buildSrc/src/main/kotlin/Extensions.kt index b5a89ec..687b731 100644 --- a/buildSrc/src/main/kotlin/Extensions.kt +++ b/buildSrc/src/main/kotlin/Extensions.kt @@ -39,8 +39,15 @@ fun Project.isGeneralFlavor(gradle: Gradle): Boolean { return getCurrentFlavor(gradle) == "general" } +fun Project.isReleaseBuild(): Boolean { + return (gradle.startParameter.taskNames.size > 0 && + gradle.startParameter.taskNames[0].contains( + "Release", + )) +} + fun Project.isNightlyBuild(): Boolean { - return gradle.startParameter.taskRequests.toString().contains("Nightly") + return gradle.startParameter.taskNames.contains("assembleFdroidNightly") } fun Project.getSigningProperties() : Properties {