Skip to content

androidGitVersion triggering an exception on a new fork without any tag yet #94

@anr2me

Description

@anr2me

Tested on a new fork (master branch only and doesn't have any tag yet) of ppsspp repository with ./gradlew androidGitVersion from this PR running the manual_generate_apk.yml
https://github.com/ANR2MERefork/ppsspp/actions/runs/8396532920/job/22998104389

Using default execution profile

FAILURE: Build failed with an exception.

* Where:
Build file '/home/runner/work/ppsspp/ppsspp/android/build.gradle' line: 53

* What went wrong:
A problem occurred evaluating project ':android'.
> Not enough room for 39779 in BUILD width=4

* Try:
> Run with --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org./

Where the mentioned build.gradle line 53 is

if (androidGitVersion.name() != "unknown" && androidGitVersion.code() >= 14000000) {

Is there anyway to prevent gradle from crashing? so we can fallback to a default version/naming just like how we handle "unknown", or may be to truncate the code's part to fit the format's part's width so it doesn't crashed (not sure where it get the version code without any tag existed, seems to be a truncated commit hash)

PS: This error only occurred on a new fork

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions