Skip to content

How to build the FOSS flavor (reproducibly)? #9

Description

@IzzySoft

I've tried building the floss flavor, using ./gradlew assembleFlossRelease (after having used sed to disable signing, and set the variables to "fake values" as it otherwise still refused to build). While the previous release somehow built but was not reproducible (see Reproducible Builds and Reproducible Builds, special client support and more at IzzyOnDroid for some background), v1.3.0 even failed to build entirely:

> Task :data:lintVitalAnalyzeRelease

> Task :app:compileFlossReleaseKotlin FAILED
e: file:///build/repo/app/src/main/java/dev/aungkyawpaing/ccdroidx/feature/widget/DashboardWidget.kt:37:24 Unresolved reference 'preview'.
e: file:///build/repo/app/src/main/java/dev/aungkyawpaing/ccdroidx/feature/widget/DashboardWidget.kt:38:24 Unresolved reference 'preview'.
e: file:///build/repo/app/src/main/java/dev/aungkyawpaing/ccdroidx/feature/widget/DashboardWidget.kt:154:8 Unresolved reference 'ExperimentalGlancePreviewApi'.
e: file:///build/repo/app/src/main/java/dev/aungkyawpaing/ccdroidx/feature/widget/DashboardWidget.kt:154:8 Annotation argument must be a compile-time constant.
e: file:///build/repo/app/src/main/java/dev/aungkyawpaing/ccdroidx/feature/widget/DashboardWidget.kt:155:2 Unresolved reference 'Preview'.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileFlossReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

(as we build inside ephemeral containers, I cannot provide that log unfortunately). Build was run on Debian bookworm with OpenJDK 17, in case it matters – basically using what your Github action suggested.

Oh, I also had to sed -r '/libs.plugins.google.services/d' -i app/build.gradle.kts for the floss build as otherwise the build would crash even earlier, complaining about the absence of the google-services.json.

We'd love to enable RB for your app! Would you help us with this? Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions