Fdroid build fails when adding a new app

I’m editing the metadata on GitLab.

The metadata: https://gitlab.com/deweyspacereed/fdroiddata/-/blob/io.github.deweyreed.timer.other/metadata/io.github.deweyreed.timer.other.yml

checkupdates and fdroid lint have passed. But fdroid build keeps failing without any useful logs.

Error:

> Task :app:processOtherReleaseJavaRes NO-SOURCE
> Task :app:mergeOtherReleaseJavaResource
> Task :app:transformOtherReleaseClassesWithAsm
> Task :app:minifyOtherReleaseWithR8
> Task :app:minifyOtherReleaseWithR8 FAILED
FAILURE: Build completed with 2 failures.

https://gitlab.com/deweyspacereed/fdroiddata/-/jobs/3116473243

It seems Proguard is failing, but the build works fine during my test.

The pipeline is stuck at the end of the log, and I have to cancel it manually after twenty minutes.

I’ll test locally…brb

it exhausted 12Gb ram? Odd

I added - echo "org.gradle.jvmargs=-Xms2g -Xmx8g -XX:MaxPermSize=8g" >> ../gradle.properties retrying…

No joy, still fails

...
Caused by: java.lang.OutOfMemoryError: Java heap space

Expiring Daemon because JVM heap space is exhausted

> Task :app:lintVitalAnalyzeOtherRelease FAILED

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:minifyOtherReleaseWithR8'.
> com.android.tools.r8.CompilationFailedException: Compilation failed to complete

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:lintVitalAnalyzeOtherRelease'.
> A failure occurred while executing com.android.build.gradle.internal.lint.AndroidLintWorkAction
   > java.lang.reflect.InvocationTargetException (no error message)

How much memory does it need?

@Licaon_Kter
I tried very hard to reduce the memory pressure. Quite ironic.

Here are my global Gradle settings that don’t exist in the repo. I suppose it doesn’t matter.

org.gradle.jvmargs=-Xmx12g -XX:MaxPermSize=6g -XX:+HeapDumpOnOutOfMemoryError
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.vfs.watch=true
android.databinding.incremental=true

It seems Proguard is failing, but the build works fine during my test.

Do you assemble debug or release configuration locally?

@relan
Yes, gradle assembleOtherRelease builds successfully locally.

After disabling Proguard, another failure appears. This is so weird.

> Task :app:extractOtherReleaseNativeSymbolTables NO-SOURCE
> Task :app:mergeOtherReleaseNativeDebugMetadata NO-SOURCE
> Task :app:desugarOtherReleaseFileDependencies
> Task :app:transformOtherReleaseClassesWithAsm FAILED

https://gitlab.com/deweyspacereed/fdroiddata/-/jobs/3121847056

@Licaon_Kter is right! It is a memory issue.

After I copy org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 settings from a newly-created project to gradle.properties, the build is normal.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.