Closed linsui closed 11 months ago
I can't just remove it because it is used for background jobs. And I didn't want to 'upgrade' it to WorkManager because that pulls in Jetpack WorkManager which is way more and still includes those Google dependencies. So happy to hear of alternatives to android-job but I don't have a good option right now that I know of.
I'm not a android dev so I can't provide a suggestion. Many other apps in F-Droid are affected so maybe we'll have a solution later. I'll come back if I have any idea. Thanks!
Most of other apps update to androidx.work:work-runtime
, e.g. https://github.com/thundernest/k-9/commit/bbbec7bf3d44bf455f8a852a81c41577ef8afad8. It doesn't depend on nonfree libs.
Ok so first of all, android-job should NOT pull in GCM. In fact, I used android-job exactly because I did not want GCM. I double-checked:
\--- com.evernote:android-job:1.2.6
\--- androidx.core:core:1.0.0 -> 1.3.1 (*)
Having said that, indeed work-manager also does not include GCM by default, it now seems, so it could indeed be used. That would be much more reliable in the future.
Ok so first of all, android-job should NOT pull in GCM. In fact, I used android-job exactly because I did not want GCM.
See https://github.com/evernote/android-job/blob/v1.4.2/library/build.gradle#L8.
That's a version Transdroid doens't use and also a compileOnly (so not included in the final build, just available as API to compile against) dependency. You can run ./gradlew app:dep
on Transdroid to see all its (transitive) dependencies. play-services-gcm
or indeed any Play Services is not one of them.
1.2.6 has the same dep, right? Though it's a compileOnly dep, it's still a dep and the related classes will be in the final dex file. Not sure if there is real non free bits in the final apk but the compilation requires the dep. It can't be built without that.
No the dependency (classes, bytes) do not end up in the final transdroid dex file (or othersie in the .apk/.aar). In fact, GCM is not a dependency of Transdroid in any way. It is a compile-only dependency of android-job but it is not transitive, which is why it doesn't end up in Transdroid at all.
Emmm, we found that many apps affected by android-job because we scanned the classes.dex files accross our repo. And remove the dep does make the classes.dex clean. I don't know more about the details why the classes ends up there. You can check that with dexdump. @licaon-kter We discussed about the ref classes, is this the same case?
I did check mostly the compile classpah as it outputs a bigger log, will rebuild and check runtime classpath locally asap.
That being said I find it odd to say "it's only needed at compile time", if a non-FOSS is needed to build the app then it's a dependency in my book, even if it does not end up in the final APK.
@licaon-kter You could consider android-job non-FOSS if it requires non-FOSS software to be compiled, in which case you could argue that Transdroid - transitively - is non-FOSS. But that goes way too far IMHO, as to compile or run Transdroid there is no software required whatsoever that isn't open-source (and distributed under an open-source library). Again, you do not need Play Services or GCM in order to compile Transdroid or to run Transdroid and the Transdroid code does not link it. In fact even android-job without that specific android-job-gcm module doesn't require any non-FOSS software to compile or execute it.
Ah, anyway we can use wire's android-job fork without gms deps.
@erickok see "Though we tried to build everyting from source,..." in https://f-droid.org/en/docs/Inclusion_Policy/
@linsui @licaon-kter I notice the current version of transdroid (v2.5.22) seems to have been disabled in fdroid:
apparently due to this issue; what's the way forward to get this back in fdroid?
@bwitt see discussion above
from the discussion it sounds like we could switch to "wire's android-job fork without gms deps" (is that https://github.com/wireapp/android-job ?) ; what's the migration like?
When I compare that repo with the original (https://github.com/evernote/android-job) it seems identical: https://github.com/evernote/android-job/compare/master...wireapp:android-job:master
what am I missing?
@bwitt branch wireapp/v1.2.6-nogms
I created https://github.com/erickok/transdroid/pull/649 to switch to work manager; could we check that to ensure it fixes this issue? also just wanted to confirm @erickok you'd be ok with switching to work manager?
It can't hurt and will at least resolve these discussions.
Missed this notification, updated now. :tada:
com.evernote:android-job pulls in GMS. Could you please remove it? It's also deprecated. Thanks!