antimine-android icon indicating copy to clipboard operation
antimine-android copied to clipboard

F-Droid build failed

Open linsui opened this issue 2 years ago • 11 comments

https://monitor.f-droid.org/builds/log/dev.lucanlm.antimine/1705061#site-footer Could you please take a look? Thanks!

linsui avatar Nov 04 '23 07:11 linsui

@linsui I just released a new version. I hope it fixes the build.

lucasnlm avatar Nov 06 '23 02:11 lucasnlm

https://gitlab.com/linsui/fdroiddata/-/jobs/5464389590 The build still fails.

linsui avatar Nov 06 '23 05:11 linsui

(https://gitlab.com/fdroid/fdroiddata/-/jobs/5468271156#L1516) hence https://gitlab.com/fdroid/fdroiddata/-/commit/774d637b14906407288f37928820495742cd0da0

licaon-kter avatar Nov 06 '23 15:11 licaon-kter

@linsui @licaon-kter Is there any way to reproduce the F-droid build script locally? It would be helpful.

lucasnlm avatar Nov 06 '23 22:11 lucasnlm

It's all there in the link above :)

rm -fr proprietary app/gradle
sdkmanager 'cmake;3.22.1'
cd app
sed -i -e "/:proprietary/d" ../settings.gradle build.gradle
sed -i -e '/gms/d' -e '/firebase/d' {.,..}/build.gradle
gradle clean
gradle assembleFossRelease

licaon-kter avatar Nov 06 '23 22:11 licaon-kter

@licaon-kter Please, can you please replace in the build script following line?

sed -i -e '/gms/d' -e '/firebase/d' {.,..}/build.gradle

by:

sed -i -e '/bugsnag/d' -e '/gms/d' -e '/firebase/d' {.,..}/build.gradle

lucasnlm avatar Nov 07 '23 13:11 lucasnlm

> Task :app:mergeFossReleaseJavaResource

> Task :app:minifyFossReleaseWithR8
WARNING: /home/vagrant/build/dev.lucanlm.antimine/app/build/intermediates/merged_java_res/fossRelease/mergeFossReleaseJavaResource/base.jar: R8: Unexpected reference to missing service class: META-INF/services/javax.annotation.processing.Processor.
ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /home/vagrant/build/dev.lucanlm.antimine/app/build/outputs/mapping/fossRelease/missing_rules.txt.
ERROR: R8: Missing class javax.annotation.processing.AbstractProcessor (referenced from: void com.google.auto.service.processor.AutoServiceProcessor.<init>() and 1 other context)
Missing class javax.annotation.processing.SupportedOptions (referenced from: com.google.auto.service.processor.AutoServiceProcessor)

> Task :app:minifyFossReleaseWithR8 FAILED
> Task :app:lintVitalAnalyzeFossRelease

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:minifyFossReleaseWithR8'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable
   > Compilation failed to complete

licaon-kter avatar Nov 07 '23 13:11 licaon-kter

It was another error on my side. I just released a new version to fix that. With the sed -i -e '/bugsnag/d' -e '/gms/d' -e '/firebase/d' {.,..}/build.gradle change it should work now.

lucasnlm avatar Nov 08 '23 01:11 lucasnlm

Fixed, thanks!

linsui avatar Nov 08 '23 07:11 linsui

Do reopen: https://gitlab.com/fdroid/fdroiddata/-/jobs/7281022527

/LE: fyi https://gitlab.com/fdroid/fdroiddata/-/commit/f2a2c69e337e1fa0a223f5f26ca0018a8a2d78fd

licaon-kter avatar Jul 08 '24 14:07 licaon-kter

Thanks for letting me know. I bumped android SDK. I will fix.

lucasnlm avatar Jul 08 '24 15:07 lucasnlm