From 27e4555dc5a0fa8b4394eebc0c646077c5fdcb5f Mon Sep 17 00:00:00 2001 From: MohamadJaara Date: Mon, 3 Jun 2024 09:15:00 +0200 Subject: [PATCH 1/3] chore: update fdroid build script --- docker-agent/builder.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docker-agent/builder.sh b/docker-agent/builder.sh index 6010b02dcc0..7f1f1565ee0 100755 --- a/docker-agent/builder.sh +++ b/docker-agent/builder.sh @@ -9,7 +9,6 @@ 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 @@ -32,8 +31,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 From 06e769edc9c8815211fc122f1049c79b147d07ce Mon Sep 17 00:00:00 2001 From: MohamadJaara Date: Mon, 3 Jun 2024 09:15:39 +0200 Subject: [PATCH 2/3] add the correct custom flavour env variable --- build.gradle.kts | 1 + buildSrc/src/main/kotlin/scripts/infrastructure.gradle.kts | 1 + buildSrc/src/main/kotlin/scripts/variants.gradle.kts | 1 + 3 files changed, 3 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 3cd06b21ce7..d4c6ed78598 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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") diff --git a/buildSrc/src/main/kotlin/scripts/infrastructure.gradle.kts b/buildSrc/src/main/kotlin/scripts/infrastructure.gradle.kts index 2ed2879768e..2762c3b0ea9 100644 --- a/buildSrc/src/main/kotlin/scripts/infrastructure.gradle.kts +++ b/buildSrc/src/main/kotlin/scripts/infrastructure.gradle.kts @@ -35,6 +35,7 @@ tasks.named("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() diff --git a/buildSrc/src/main/kotlin/scripts/variants.gradle.kts b/buildSrc/src/main/kotlin/scripts/variants.gradle.kts index c9fa0382723..f3e5e9314da 100644 --- a/buildSrc/src/main/kotlin/scripts/variants.gradle.kts +++ b/buildSrc/src/main/kotlin/scripts/variants.gradle.kts @@ -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 From 8bfd24d00944bbb132ef6106a97ac263b1e7d3ba Mon Sep 17 00:00:00 2001 From: MohamadJaara Date: Mon, 3 Jun 2024 09:16:17 +0200 Subject: [PATCH 3/3] fix: fdroid script running detekt twice --- docker-agent/builder.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-agent/builder.sh b/docker-agent/builder.sh index 7f1f1565ee0..3eaa7fc3366 100755 --- a/docker-agent/builder.sh +++ b/docker-agent/builder.sh @@ -2,7 +2,6 @@ if [ "$RUN_STATIC_CODE_ANALYSIS" = true ]; then echo "Running Static Code Analysis" - ./gradlew detektAll ./gradlew staticCodeAnalysis fi