Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FOSS flavor #288

Closed
TheLastProject opened this issue May 22, 2022 · 6 comments
Closed

FOSS flavor #288

TheLastProject opened this issue May 22, 2022 · 6 comments

Comments

@TheLastProject
Copy link
Contributor

Hey there,

We've seen several Android apps include this library lately, only for developers to be surprised their apps can't be included in F-Droid as MapLibre has proprietary dependencies (com.google.android.gms:play-services-location).

Could it be possible to offer a completely libre flavor of MapLibre for Android (that is: a flavor with no proprietary dependencies) for developers who want to offer a 100% open source version of their apps?

Common names for such a flavour would be foss or floss.

Thanks for considering :)

@wipfli
Copy link
Contributor

wipfli commented May 28, 2022

Thanks for noting this @TheLastProject. Would you have time to work on this and change the dependencies? By the way, I believe @maxammann has a MapLibre-based app in the F-Droid store, right Max?

@TheLastProject
Copy link
Contributor Author

TheLastProject commented May 28, 2022

Would you have time to work on this and change the dependencies?

I have no experience with Android build flavours myself (the apps I write only have a 100% libre version) so I don't think I will be much help there. However, from discussions with the Element team it seems like MapLibre already does check if Google Play Services is actually available so this could be fairly simple, see these excludes which have been confirmed to have removed Google Play Services completely.

By the way, I believe @maxammann has a MapLibre-based app in the F-Droid store, right Max?

I asked the team about this and apparently Ehrenamtskarte Bayern is actually not compliant but it also managed to bypass our scanners until recently. Reading the topic more it seems the developer has been notified of this so I have disabled the app for F-Droid: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/11114 (sidenote: I would love to be able to restore this app, it's a very cool concept even though I don't live in Bayern)

@maxammann
Copy link
Collaborator

We are currently discussing how we proceed with the Bavarian Volunteering Card on FDroid internally.

Im not sure in which way the maplibre android library depends on properiatry libraries right now. But I think it would be interesting to evaluate this. Maybe we somehow can also elimintate such issues for all one and for all.

@TheLastProject
Copy link
Contributor Author

Im not sure in which way the maplibre android library depends on properiatry libraries right now. But I think it would be interesting to evaluate this.

See element-hq/element-android#6100

@maxammann
Copy link
Collaborator

Case MapLibre: Depending just on MapLibre

I think the runtime dependency of maplibre for com.google.android.gms:play-services-location is not an actual problem. The hosted library is already compiled. Therefore, the gms dependency is not required for building. You can just exclude them for the final application by doing:

    applicationVariants.all { variant ->
        // If we create a FLOSS build, then we want to exclude GMS
        if (dartEnvironmentVariables.ANDROID_FLOSS) {
            variant.getCompileConfiguration().exclude group: 'com.google.android.gms', module: 'play-services-location'
            variant.getRuntimeConfiguration().exclude group: 'com.google.android.gms', module: 'play-services-location'
        }
    }

I would hope that Gradle doesn't even download the gms dependency in this case.

Case flutter-geolocator

I like to include this case even though its unrelated, to give an example where the GMS dependency is problematic.
When depending on flutter-geolocator in a flutter project you are not depending on a pre-compiled library, but on a Gradle project which includes sources. In order to compile the source files of flutter-geolocator you need to download gms and use it during the compilation. Afterwards you can exclude it.

Conclusion

Users of maplibre should be able to convince Gradle that it does not need the gms dependency. It should be possible to make Gradle not download gms. Therefore, we should not modiy maplibre in my opinion. Users can opt out of gms already becaues it is a runtime dependency.

@wipfli
Copy link
Contributor

wipfli commented Jun 8, 2022

Thanks for the clarification. In this case I think it is OK to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants