Closed licaon-kter closed 5 months ago
Interesting. Previous version was built fine and nothing significant changed since last version except of maybe raising Room library version. Also I don't recognize these pngs and don't think that the app has any pngs at all, maybe they are from some external library. Did something maybe changed on the fdroid side?
Also I don't recognize these pngs and don't think that the app has any pngs at all, maybe they are from some external library
https://github.com/Razeeman/Android-SimpleTimeTracker/tree/master/app/src/main/res/ has PNGs in mipmap folders, the names in the APK are different once processed, afaik
Did something maybe changed on the fdroid side?
Not recently
Sorry, you are right, there were some PNGs in the project, but also they were there for a long time. Converted them to webp anyway, maybe it will help with the next f-droid build.
@licaon-kter is there any update on this issue?
Maybe the next release that was just pushed....
One of the different pngs is . I guess it's generated from a drawable icon.
I thought this is the problem. Could you please try this workground?
For kts, both
vectorDrawables.generatedDensities()
and
vectorDrawables.generatedDensities?.clear()
should work. I added them to core/build.gradle.kts and got the same apks.
Hello! Thank you for the help. Problem indeed seems to be with the pngs generated from vector drawables. This fix maybe would work but lower apis (19, 20) will crash without generated pngs. So it would be also required to raise minSdk to 21. Fortunately very very small number of users are using such old phones.
@licaon-kter @linsui I was wondering if there is an easy way to check fdroid build without releasing a new update? I've checked documentation and it seems that fdroidserver and fdroiddata repos should be installed and configured properly to run fdroid build, and it doesn't seem like a trivial task.
@Razeeman you can open a MR here: https://gitlab.com/fdroid/fdroiddata/-/merge_requests and the Gitlab CI will run fdroid for you
@licaon-kter Hello! New release was pushed, implemented this fix, also raised minSdk to 21, checked that vector drawables didn't generate pngs now.
fdroid data was updated it seems, but it didn't trigger fdroid build.
Can you help identify the problem?
It builds. Thanks! See https://gitlab.com/fdroid/fdroiddata/-/jobs/4324352340
Thank you for the help!
so I won't open a new one, can you reopen this?
ref: https://gitlab.com/fdroid/fdroiddata/-/jobs/6468076066#L1765
only difference is:
│ │ │ │ │ │ --- 1.40-stt-base-release/smali/com/example/util/simpletimetracker/DaggerTimeTrackerApp_HiltComponents_SingletonC$SingletonCImpl.smali
│ │ │ │ │ ├── +++ com.razeeman.util.simpletimetracker_43/smali/com/example/util/simpletimetracker/DaggerTimeTrackerApp_HiltComponents_SingletonC$SingletonCImpl.smali
│ │ │ │ │ │ @@ -5059,15 +5059,15 @@
│ │ │ │ │ │ .method public injectTimeTrackerApp(Lcom/example/util/simpletimetracker/TimeTrackerApp;)V
│ │ │ │ │ │ .locals 0
│ │ │ │ │ │ .annotation system Ldalvik/annotation/MethodParameters;
│ │ │ │ │ │ accessFlags = {
│ │ │ │ │ │ 0x0
│ │ │ │ │ │ }
│ │ │ │ │ │ names = {
│ │ │ │ │ │ + "arg0"
│ │ │ │ │ │ - "timeTrackerApp"
│ │ │ │ │ │ }
│ │ │ │ │ │ .end annotation
│ │ │ │ │ │
│ │ │ │ │ │ .line 0
│ │ │ │ │ │ return-void
│ │ │ │ │ │ .end method
/LE: fyi https://gitlab.com/fdroid/fdroiddata/-/commit/424f243c7325f6f85bec53bbcccfe39feb9b128f
@licaon-kter Hello! I'm not familiar with Fdroid building process. Can you share what are the two apks that are being compared here, where are they came from?
The CI APK was removed so can't point to it directly,
The recipe is here: https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/com.razeeman.util.simpletimetracker.yml#L247-L259
so, those two sed
s are run, then gradle clean
, then gradle assembleBaseRelease
, the log shows as much: https://gitlab.com/fdroid/fdroiddata/-/jobs/6468076066#L1765
Is it correct that CI builds apk and then compares it to the one stored in github releases?
yes, as set in the recipe: https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/com.razeeman.util.simpletimetracker.yml#L12
and seen in the CI log: https://gitlab.com/fdroid/fdroiddata/-/jobs/6468076066#L1676
/LE: I'll rebuild locally to test again
Local build does have this line in it, as mentioned here https://github.com/Razeeman/Android-SimpleTimeTracker/issues/89#issuecomment-2017737970. But I'm not sure what produces this difference, may be it is built this different java version, or these sed commands do something, need to research more.
may be it is built this different java version
you mean you don't use Java 17?
these sed commands do something,
you can run them in the app
folder, clean cache, rebuild APK, how is that then?
Yep. Seems like It caused by sed commands. Run them locally and rebuild as you suggested.
Ok, let me review them then, thanks for the confirmation
Maybe I spoke too soon, sorry, I didn't try to rebuild locally before running these commands. I've tried that and it also produces correct build even without running sed commands.
@licaon-kter Can you please share, If I rebuild version 1.41 and reupload it to github releases, will it appear on fdroid or new release should be created in order to trigger fdroid update?
it's disabled now for 1.41, so we can enable it after confirming
so, you can update the APK in https://github.com/Razeeman/Android-SimpleTimeTracker/releases/tag/v1.41 and then we recheck
Rebuilt 1.41 and updated apk in github release.
@Razeeman wow, that's repro :tada: how did you fix it?
/LE: fyi https://gitlab.com/fdroid/fdroiddata/-/commit/2379245df9274401b69976f2803ca9ef58011e15
Just rebuilt it the usual way. Not sure what messed up previous two releases. Will keep an eye next time.
ref: https://gitlab.com/fdroid/fdroiddata/-/jobs/3917489169#L2102
I've tried some tricks about PNGs but maybe they need to be adapted to Kotlin? eg. https://gitlab.com/fdroid/fdroiddata/-/issues/2816#note_1311197528