Skip to content

Commit

Permalink
fix: errors in fdroid build script causeing it to build DevDebug inst…
Browse files Browse the repository at this point in the history
…ead of FdroidRelease 🍒 (#3062)

Co-authored-by: Mohamad Jaara <mohamad.jaara@wire.com>
Co-authored-by: Vitor Hugo Schwaab <vitor@schwaab.dev>
  • Loading branch information
3 people authored Jun 4, 2024
1 parent 0ef498b commit a7b73c0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ buildscript {
classpath(libs.hilt.gradlePlugin)
val fdroidBuild = (System.getenv("flavor")
?: System.getenv("FLAVOR")
?: System.getenv("CUSTOM_FLAVOR")
?: gradle.startParameter.taskRequests.toString())
.lowercase()
.contains("fdroid")
Expand Down
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/scripts/infrastructure.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ tasks.named<Wrapper>("wrapper") {
tasks.register("runUnitTests") {
description = "Runs all Unit Tests."
dependsOn(":app:test${Default.BUILD_VARIANT}UnitTest")
// kalium have only 2 build type debug or release
val buildType =
if (Default.resolvedBuildType() == Variants_gradle.BuildTypes.DEBUG) Default.resolvedBuildType().capitalized()
else Variants_gradle.BuildTypes.RELEASE.capitalized()
Expand Down
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/scripts/variants.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ object BuildTypes {
object Default {
fun explicitBuildFlavor(): String? = System.getenv("flavor")
?: System.getenv("FLAVOR")
?: System.getenv("CUSTOM_FLAVOR")

fun resolvedBuildFlavor(): String = explicitBuildFlavor() ?: ProductFlavors.Dev.buildName

Expand Down
5 changes: 1 addition & 4 deletions docker-agent/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

if [ "$RUN_STATIC_CODE_ANALYSIS" = true ]; then
echo "Running Static Code Analysis"
./gradlew detektAll
./gradlew staticCodeAnalysis
fi

if [ "$RUN_APP_UNIT_TESTS" = true ] ; then
echo "Running App Unit Tests"
./gradlew runUnitTests
./gradlew runUnitTestsFdroid
fi

if [ "$RUN_APP_ACCEPTANCE_TESTS" = true ] ; then
Expand All @@ -32,8 +30,7 @@ fi

if [ "$BUILD_CLIENT" = true ] ; then
echo "Compiling the client with Flavor:${CUSTOM_FLAVOR} and BuildType:${BUILD_TYPE}"
#./gradlew ${buildOption}assemble${FLAVOR_TYPE}${BUILD_TYPE}
./gradlew ${buildOption}assemble${CUSTOM_FLAVOR}
./gradlew ${buildOption}assemble${FLAVOR_TYPE}${BUILD_TYPE}
else
echo "Building the client will be skipped"
fi
Expand Down

0 comments on commit a7b73c0

Please sign in to comment.