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

Failed to build #34

Open
IzzySoft opened this issue Nov 14, 2024 · 5 comments
Open

Failed to build #34

IzzySoft opened this issue Nov 14, 2024 · 5 comments

Comments

@IzzySoft
Copy link

I tried building the app from source, going by the steps in the workflow:

build:
  - sed -r '/signingConfigs.release/d' -i android/app/build.gradle
  - git clone -b 3.24.5 https://github.com/flutter/flutter
  - export PUB_CACHE=${PWD}/.pub-cache
  - flutter/bin/flutter config --no-analytics
  - flutter/bin/flutter pub get
  - flutter/bin/flutter build apk --release --split-per-abi --target-platform=android-arm64
build_home_dir: /home/runner
build_repo_dir: /home/runner/work/flut-renamer/flut-renamer
provisioning:
  android_home: /opt/sdk
  cmdline_tools:
    version: '12.0'
    url: https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
    sha256: 2d2d50857e4eb553af5a6dc3ad507a17adf43d115264b1afc116f95c92e5e258
  extra_packages:
    - curl
    - clang
    - cmake
    - ninja-build
    - pkg-config
    - libgtk-3-0
    - libgtk-3-dev
    - libblkid1
    - liblzma5
  image: debian:bookworm-slim
  jdk: openjdk-17-jdk-headless

But the build fails when it invokes gradle:

Downloading android-x64-release/linux-x64 tools...                 105ms

Running Gradle task 'assembleRelease'...                        

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file '/home/runner/work/flut-renamer/flut-renamer/android/app/build.gradle' line: 31

* What went wrong:
A problem occurred evaluating project ':app'.
> path may not be null or empty string. path='null'

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

2: Task failed with an exception.
-----------
* Where:
Build file '/home/runner/work/flut-renamer/flut-renamer/android/app/build.gradle' line: 31

* What went wrong:
A problem occurred evaluating project ':app'.
> path may not be null or empty string. path='null'

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

BUILD FAILED in 1m 39s
Running Gradle task 'assembleRelease'...                          100.1s
Gradle task assembleRelease failed with exit code 1

As you can see, I even reflected the Github environment with the home and repo directories. Any hints what I might have missed?

Btw, instead of specifying a "moving target" like stable, could you maybe add the flutter version you use as git submodule here, or at least specify it in pubspec.yaml?

environment:
  sdk: '>=3.0.0 <4.0.0'
  flutter: 3.24.5

That would help reproducing a build even months later (and yes, the reason I try to build your app is Reproducible Builds – see Reproducible Builds, special client support and more at IzzyOnDroid).

Thanks in advance for your help!

@sun-jiao
Copy link
Owner

Thanks, I'll take a look.

@IzzySoft
Copy link
Author

IzzySoft commented Dec 6, 2024

Found something, @sun-jiao?

@sun-jiao
Copy link
Owner

sun-jiao commented Dec 6, 2024

I'll fix the build on the newest flutter and use a fixed version in the script in the next week.

@sun-jiao
Copy link
Owner

sun-jiao commented Dec 9, 2024

@IzzySoft I've updated the android gradle version and flutter dependencies. And I've added a fixed number (same as my local version) in the GitHub actions script. Could you have a try and tell me the result?

@IzzySoft
Copy link
Author

IzzySoft commented Dec 9, 2024

Thanks! That builds fine! Now, as the background is "reproducible builds" (see initial post): could you provide me an APK you've build from that commit (d2e5b8e) so I can have them compared by our builder?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants