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

F-Droid can't build - org.maplibre.gl:android-sdk pulls in non-FOSS Google Services #6100

Closed
licaon-kter opened this issue May 19, 2022 · 15 comments · Fixed by #6136
Closed
Labels
A-Location O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems Z-fdroid F-Droid variant

Comments

@licaon-kter
Copy link

Steps to reproduce

Try to build for fdroid... gradle dependencies for fdroidRelease* says:

+--- org.maplibre.gl:android-sdk:9.5.2
|    +--- org.maplibre.gl:android-sdk-geojson:5.9.0
|    |    \--- com.google.code.gson:gson:2.8.6
|    +--- com.mapbox.mapboxsdk:mapbox-android-gestures:0.7.0
|    |    +--- androidx.core:core:1.0.0 -> 1.7.0 (*)
|    |    \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    +--- org.maplibre.gl:android-sdk-turf:5.9.0
|    |    \--- org.maplibre.gl:android-sdk-geojson:5.9.0 (*)
|    +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    +--- androidx.fragment:fragment:1.0.0 -> 1.4.1 (*)
|    +--- com.squareup.okhttp3:okhttp:3.12.3 -> 4.9.3 (*)
|    \--- com.google.android.gms:play-services-location:16.0.0

Since: 824e713

Outcome

Can't build from FOSS deps

Your phone model

No response

Operating system version

No response

Application version and app store

No response

Homeserver

No response

Will you send logs?

No

@licaon-kter licaon-kter added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label May 19, 2022
@RiotRobot RiotRobot added this to Incoming in Issue triage May 19, 2022
@licaon-kter
Copy link
Author

Element 1.13.18 or later (first one published by F-Droid since it skipped 1.13.16/17)

And @SpiritCroc Schildi Chat 1.4.4.sc50 or later

@bmarty bmarty added S-Critical Prevents work, causes data loss and/or has no workaround O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience Z-fdroid F-Droid variant labels May 20, 2022
@licaon-kter
Copy link
Author

Will rebuild with this fix deltachat/deltachat-android#2303 to test now

@bmarty
Copy link
Member

bmarty commented May 20, 2022

Thanks for opening the issue.

We could try the same fix than deltachat/deltachat-android#2303

Also we could add a check of issue like that to our CI. F-Droid team is working on a standalone version of the F-Droid scanner. So this will be for later.

Also the plan is to skip release 1.4.16 on F-Droid, fix this issue and release next 1.4.18 on F-Droid. At the end the previous "non-strictly-free" versions of Element Android on F-Droid will be disabled. This are versions from 1.3.16 to 1.4.14.

Labelled as S-Critical as it's preventing F-Droid version from being released.

@ouchadam
Copy link
Contributor

if the dependency exclusion doesn't work we may need to exclude the feature from the fdroid variant

@bmarty
Copy link
Member

bmarty commented May 20, 2022

if the dependency exclusion doesn't work we may need to exclude the feature from the fdroid variant

It will have to be checked, but according to the description of deltachat/deltachat-android#2303 it should work fine 🤞

@licaon-kter
Copy link
Author

While DeltaChat builds fine and clean it's not the same here. gms classes are still inside the APK.

I've edited from implementation 'org.maplibre.gl:android-sdk:9.5.2' to implementation ('org.maplibre.gl:android-sdk:9.5.2') { exclude group: 'com.google.android.gms' }

Retrying now with the same version 9.4.0, maybe it matters

@licaon-kter
Copy link
Author

licaon-kter commented May 20, 2022

Fails in a different way:

> Task :library:ui-styles:compileReleaseJavaWithJavac

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':vector:dataBindingMergeDependencyArtifactsFdroidRelease'.
> Could not resolve all files for configuration ':vector:fdroidReleaseCompileClasspath'.
   > Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0.
     Required by:
         project :vector > org.maplibre.gl:android-sdk:9.4.2

Of note I did specify 9.4.0 not 9.4.2 but maybe it's the way it works and uses latest point release?

/LE: deps

+--- org.maplibre.gl:android-sdk:9.4.0 -> 9.4.2
|    +--- org.maplibre.gl:android-sdk-geojson:5.9.0
|    |    \--- com.google.code.gson:gson:2.8.6
|    +--- com.mapbox.mapboxsdk:mapbox-android-gestures:0.7.0
|    |    +--- androidx.core:core:1.0.0 -> 1.7.0 (*)
|    |    \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    +--- com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0 FAILED
|    +--- org.maplibre.gl:android-sdk-turf:5.9.0
|    |    \--- org.maplibre.gl:android-sdk-geojson:5.9.0 (*)
|    +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    +--- androidx.fragment:fragment:1.0.0 -> 1.4.1 (*)
|    +--- com.squareup.okhttp3:okhttp:3.12.3 -> 4.9.3 (*)
|    \--- com.google.android.gms:play-services-location:16.0.0
|         +--- com.google.android.gms:play-services-base:16.0.1
|         |    +--- com.google.android.gms:play-services-basement:16.0.1
|         |    |    \--- com.android.support:support-v4:26.1.0 -> androidx.legacy:legacy-support-v4:1.0.0 (*)
|         |    \--- com.google.android.gms:play-services-tasks:16.0.1
|         |         \--- com.google.android.gms:play-services-basement:16.0.1 (*)
|         +--- com.google.android.gms:play-services-basement:16.0.1 (*)
|         +--- com.google.android.gms:play-services-places-placereport:16.0.0
|         |    \--- com.google.android.gms:play-services-basement:16.0.1 (*)
|         \--- com.google.android.gms:play-services-tasks:16.0.1 (*)

@licaon-kter
Copy link
Author

licaon-kter commented May 20, 2022

For comparison, deps tree for DeltaChat with 9.4.0 and excluded gms:

\--- org.maplibre.gl:android-sdk:9.4.0
     +--- com.mapbox.mapboxsdk:mapbox-sdk-geojson:5.3.0
     |    \--- com.google.code.gson:gson:2.8.6
     +--- com.mapbox.mapboxsdk:mapbox-android-gestures:0.7.0
     |    +--- androidx.core:core:1.0.0 -> 1.3.2 (*)
     |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
     +--- com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0
     |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
     +--- com.mapbox.mapboxsdk:mapbox-sdk-turf:5.3.0
     |    \--- com.mapbox.mapboxsdk:mapbox-sdk-geojson:5.3.0 (*)
     +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
     +--- androidx.fragment:fragment:1.0.0 -> 1.2.4 (*)
     \--- com.squareup.okhttp3:okhttp:3.12.3
          \--- com.squareup.okio:okio:1.15.0

@bmarty
Copy link
Member

bmarty commented May 20, 2022

It should work fine, I will give it a try.

It's already done here: https://github.com/vector-im/element-android/blob/main/vector/build.gradle#L489 FWIW.

OOI what is the meaning of /LE ?

@licaon-kter
Copy link
Author

licaon-kter commented May 20, 2022

Later Edit but what does OOI mean? :)

Not sure why you've linked to JitsiMeet... this issue is about gms brought by maplibre...as all my posts above show

😕

@bmarty
Copy link
Member

bmarty commented May 20, 2022

Out Of Interest :)

I wanted to point out that we are already excluding the group for another of our dependency: exclude group: 'com.google.android.gms'. So it should work the same for MapLibre.

@licaon-kter
Copy link
Author

@ouchadam
Copy link
Contributor

ouchadam commented May 25, 2022

@licaon-kter thanks for confirming! 💯

Scheduled to be released in 1.4.18

@SpiritCroc
Copy link
Contributor

Disabled old ones: https://gitlab.com/fdroid/fdroiddata/-/commit/2113d686eb3ee4525ef141a39e095ea4e37e2653

@SpiritCroc fyi https://gitlab.com/fdroid/fdroiddata/-/commit/0507813723a4551d2eb0428b4454d7bc04e75ecc

I just picked the fix, doing a beta build right now and will likely do a new release within the next few days with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Location O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems Z-fdroid F-Droid variant
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants