GithubHelp home page GithubHelp logo

Comments (4)

champo avatar champo commented on June 16, 2024

Hi! Thanks for reaching out and the research. We're really close to officially supporting reproducible builds, our next release will include it. It will include better instructions and a Dockerfile for easier building.

(Disclaimer: I haven't run your steps, but the errors look eerily similar to the ones I had when crafting the Dockerfile)

  1. I think you need to make sure to mkdir -p android/apollo/libs before running ./tools/libwallet-android.sh.
  2. Should be :android:apolloui:assembleProdRelease. Thanks for finding this error!
  3. The other error should be fixed after 1., it's caused by the failures to build the lib.

from apollo.

champo avatar champo commented on June 16, 2024

BTW, the release should be in the next few days! If you have any feedback once it's out I'd love to hear it.

from apollo.

emanuelb avatar emanuelb commented on June 16, 2024

Thanks, it's kinda worked, shame that I didn't try the mkdir -p before posting this issue, anyway it returned:

rebuilt gomobile with status 0 to /app/munn/android/apollo/libs/libwallet.aar

and then ./gradlew :android:apolloui:assembleProdRelease command failed with:

> > Task :android:apollo:libwallet
rebuilt gomobile with status 0 to /app/munn/android/apollo/libs/libwallet.aar

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':android:apolloui:checkProdReleaseDuplicateClasses'.
> Could not resolve all files for configuration ':android:apolloui:prodReleaseRuntimeClasspath'.
   > Failed to transform libwallet.aar to match attributes {artifactType=android-classes, org.gradle.usage=java-runtime}.
      > Execution failed for AarToClassTransform: /home/appuser/.gradle/caches/transforms-2/files-2.1/0f995b8c08717c0d0c5400dafd9d97fd/jetified-libwallet.aar.
         > zip file is empty

but ./gradlew assembleRelease worked! with lots of warnings, some are mostly errors, like:

Task :android:apollo:bundleReleaseAar
WARNING: The AAR produced by this build for the :android:apollo project is broken. Direct local .aar file dependencies are not supported when building an AAR. The resulting AAR is broken because the classes and Android resources from any local .aar file dependencies are not packaged in the resulting AAR. Previous versions of the Android Gradle Plugin produce broken AARs in this case too (despite not having this warning), and this warning will be replaced with an error in subsequent versions of the Android Gradle Plugin. The following direct local .aar file dependencies caused this warning: /app/munn/android/apollo/libs/libwallet.aar

and many many other warnings, which you should take a look at if they happen on the soon to be released version. The resulted APK is not reproducible (diffs in PNG files & resources.arsc & classes.dex & classes2.dex)
Will test the upcoming release when it will be available :)

from apollo.

emanuelb avatar emanuelb commented on June 16, 2024

There is now Dockerfile in ./apollo/android/Dockerfile and I used below Containerfile to compile version 45.1:

FROM frolvlad/alpine-glibc

RUN set -ex; \
    apk update; \
    apk add --no-cache \
        openjdk11 \
        bash \
        git \
        go; \
    adduser -D appuser;

USER appuser

ENV ANDROID_SDK_ROOT="/app/sdk" \
    ANDROID_HOME="/app/sdk"
    
COPY --chown=appuser:root . /app/munn/

RUN set -ex; \
    mkdir -p "/app/sdk/licenses"; \
    printf "\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > "/app/sdk/licenses/android-sdk-license"; \
    cd /app/sdk/; \
    wget https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip; \
    unzip commandlinetools-linux-6858069_latest.zip; \
    rm commandlinetools-linux-6858069_latest.zip; \
    /app/sdk/cmdline-tools/bin/sdkmanager --sdk_root=/app/sdk/ --install "ndk-bundle" "platforms;android-28";
    
WORKDIR /app/munn/
ENV ANDROID_NDK_HOME="/app/sdk/ndk/22.0.7026061/" \
    PATH="$PATH:/usr/lib/jvm/java-11-openjdk/bin/:/home/appuser/go/bin"

RUN set -ex; \
    mkdir -p /app/munn/android/apollo/libs; \
    ./tools/bootstrap-gomobile.sh; \
    ./tools/libwallet-android.sh; \
    ./gradlew :android:apollo:libwallet; \
    ./gradlew :android:apolloui:assembleProdRelease;

APK file will be in: /app/munn/android/apolloui/build/outputs/apk/prod/release/apolloui-prod-release-unsigned.apk
so closing this issue as it's solved.

from apollo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.