Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: errors in fdroid build script causeing it to build DevDebug instead of FdroidRelease #3060

Merged
merged 3 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should really document these in a BUILDING.md file or similar.

So we could summarise all of the process not only for newcomers but for us. There might be room to simplify stuff but I can say from my side that it's a bit hard to wrap my head around all the env variables needed to make releases.

?: 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
Loading